Cell type specific markers in WT Arabidopsis roots

Working directory should contain root atlas Seurat object, which is available on GEO under record GSE152766:

Root_Atlas.rds (or get it by running through notebook 2, 3, 4, 5, 6, 7, 8, 9 & 10)

Working directory must contain subdirectories,supp_data

supp_data/ should contain the files, which are available on Github (github.com/Hsu-Che-Wei/COPILOT):

features.tsv.gz
Curated_Markers.csv
In [1]:
rm(list=ls())
# Set the working directory to where folders named after the samples are located. 
# The folder contains spliced.mtx, unspliced.mtx, barcodes and gene id files, and json files produced by scKB that documents the sequencing stats. 
setwd("/scratch/AG_Ohler/CheWei/scKB")
In [1]:
library(tidyverse)
library(Seurat)
library(RColorBrewer)
library(future)
#for 200gb ram 
options(future.globals.maxSize = 200000 * 1024^2)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──

✔ ggplot2 3.3.0     ✔ purrr   0.3.3
✔ tibble  3.0.1     ✔ dplyr   0.8.5
✔ tidyr   1.0.2     ✔ stringr 1.4.0
✔ readr   1.3.1     ✔ forcats 0.5.0

── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()

In [3]:
# Load atlas
rc.integrated <- readRDS("./Root_Atlas.rds")
In [4]:
# Simple QC label
rc.integrated$celltype.anno <- gsub("Putative Quiescent Center", "Quiescent Center", rc.integrated$celltype.anno, ignore.case = FALSE, perl = FALSE,
     fixed = T, useBytes = FALSE)

order <- c("Quiescent Center", "Stem Cell Niche", "Columella", "Lateral Root Cap", "Atrichoblast", "Trichoblast", "Cortex", "Endodermis", "Pericycle", "Phloem", "Xylem", "Procambium", "Unknown")
palette <- c("#9400d3", "#DCD0FF", "#5AB953", "#BFEF45", "#008080", "#21B6A8", "#82B6FF", "#0000FF","#FF9900","#E6194B", "#9A6324", "#FFE119","#EEEEEE")
rc.integrated$celltype.anno <- factor(rc.integrated$celltype.anno, levels = order[sort(match(unique(rc.integrated$celltype.anno),order))])
color <- palette[sort(match(unique(rc.integrated$celltype.anno),order))]
In [5]:
# Plot atlas with celltype annotation
options(repr.plot.width=8, repr.plot.height=6)
DimPlot(rc.integrated, reduction = "umap", group.by = "celltype.anno", cols=color)
In [6]:
# Plot atlas with time zone annotation
options(repr.plot.width=8, repr.plot.height=6)
time_plt <- DimPlot(rc.integrated, 
        group.by = "time.anno", 
        order = c("Maturation","Elongation","Meristem"),
        cols = c("#DCEDC8", "#42B3D5", "#1A237E"))
time_plt

FindMarkers for each cell type

In [7]:
# Set the identity of interest to cell type
Idents(rc.integrated) <- "celltype.anno"
# Set the expression matrix used for DE to batch-corrected and scaled one 
DefaultAssay(rc.integrated) <- "integrated"
In [8]:
# run differentially expression (DE) analysis using ROC method, select randomly 10000 cells for each cell type
Clust_Markers <- FindAllMarkers(rc.integrated,
                                logfc.threshold=log(2),
                                min.diff.pct = 0.25,
                                max.cells.per.ident = 10000,
                                only.pos=T, 
                               test.use="roc")
Calculating cluster Quiescent Center

Calculating cluster Stem Cell Niche

Calculating cluster Columella

Calculating cluster Lateral Root Cap

Calculating cluster Atrichoblast

Calculating cluster Trichoblast

Calculating cluster Cortex

Calculating cluster Endodermis

Calculating cluster Pericycle

Calculating cluster Phloem

Calculating cluster Xylem

Calculating cluster Procambium

In [9]:
# Load in gene ids and names
feature_names <- read_tsv("./supp_data/features.tsv.gz", col_names = c("gene", "Name", "Type")) %>%
  select(-Type) %>%
  distinct()
Parsed with column specification:
cols(
  gene = col_character(),
  Name = col_character(),
  Type = col_character()
)

In [10]:
# Merge the DE output with corresponding gene id and name
Clust_Markers <- left_join(Clust_Markers, feature_names)
Joining, by = "gene"

In [11]:
# For each cell type, select the top 3 genes according to AUC score
Clust_Markers %>% group_by(cluster) %>% top_n(3, myAUC)
A grouped_df: 39 × 8
myAUCavg_diffpowerpct.1pct.2clustergeneName
<dbl><dbl><dbl><dbl><dbl><fct><chr><chr>
0.9753.4180460.9500.9950.235Quiescent CenterAT2G20490NOP10
0.9693.3208330.9380.9820.180Quiescent CenterAT2G37600RPL36A
0.9673.1415380.9340.9820.142Quiescent CenterAT4G25630MED36A
0.9632.9241850.9260.9960.266Stem Cell Niche AT1G27400RPL17A
0.9593.1526800.9180.9630.138Stem Cell Niche AT4G25630MED36A
0.9592.9653800.9180.9800.182Stem Cell Niche AT4G10450RPL9D
0.9592.8634160.9180.9910.248Stem Cell Niche AT3G45030RPS20C
0.9592.8427320.9180.9930.254Stem Cell Niche AT3G16080RPL37C
0.9592.7826420.9180.9930.247Stem Cell Niche AT5G16130RPS7C
0.9544.9911880.9080.9460.204Columella AT5G53460GLT1
0.9494.7883310.8980.8530.053Columella AT4G15530PPDK
0.9403.5156080.8800.9310.168Columella AT4G37870PCKA
0.9402.5130560.8800.9730.192Lateral Root CapAT2G41800AT2G41800
0.9224.5616890.8440.8290.076Lateral Root CapAT4G37160sks15
0.9224.1864200.8440.8030.080Lateral Root CapAT1G54010GLL23
0.9152.6401020.8300.8780.164Atrichoblast AT1G13590PSK1
0.9023.1116980.8040.8590.186Atrichoblast AT3G29250SDR4
0.8864.5422980.7720.8220.259Atrichoblast AT5G60950COBL5
0.9848.1612010.9680.9560.077Trichoblast AT1G23750AT1G23750
0.9736.9607780.9460.9600.135Trichoblast AT5G40510AT5G40510
0.9684.7175390.9360.9550.180Trichoblast AT1G58270ZW9
0.9865.2126180.9720.9790.068Cortex AT1G02850BGLU11
0.9763.7340030.9520.9620.097Cortex AT1G12090ELP
0.9665.8972860.9320.9440.117Cortex AT5G65380DTX27
0.9956.1210060.9900.9770.024Endodermis AT2G14900GASA7
0.9925.1404040.9840.9720.033Endodermis AT1G05260PER3
0.9855.4562840.9700.9150.032Endodermis AT4G11290PER39
0.9333.7323600.8660.9390.226Pericycle AT1G27130GSTU13
0.9332.1251970.8660.9640.158Pericycle AT2G02130PDF2.3
0.9313.1088850.8620.9520.222Pericycle AT4G34620RPS16-1
0.9824.8130680.9640.9730.071Phloem AT3G43270PME32
0.9733.2541280.9460.9880.140Phloem AT3G21770PER30
0.9703.6332470.9400.9590.066Phloem AT1G07640OBP2
0.9846.4771890.9680.9630.006Xylem AT4G36160ANAC076
0.9786.7889480.9560.9600.014Xylem AT5G03170FLA11
0.9734.3384660.9460.9700.082Xylem AT3G51030TRX1
0.9372.3424640.8740.9270.155Procambium AT1G12080AT1G12080
0.9293.3288090.8580.8970.146Procambium AT5G05690CYP90A1
0.9202.5601640.8400.8810.174Procambium AT2G13820AT2G13820
In [12]:
Clust_Markers$cluster_gene <- paste(Clust_Markers$cluster, Clust_Markers$gene, sep="_")
In [13]:
# store all results 

All_clust_markers <- Clust_Markers

# subset based on AUC 0.75

Clust_Markers <- filter(Clust_Markers, myAUC>=0.75)
In [14]:
# Calculate the frequency of genes being detected as marker
(times_per_gene <- Clust_Markers %>%
ungroup() %>%
group_by(gene) %>%
tally())
A tibble: 3981 × 2
genen
<chr><int>
AT1G010101
AT1G010701
AT1G011002
AT1G011701
AT1G012401
AT1G013601
AT1G013801
AT1G015701
AT1G015801
AT1G017501
AT1G019001
AT1G019401
AT1G021601
AT1G022051
AT1G023401
AT1G023801
AT1G024601
AT1G025001
AT1G026401
AT1G026902
AT1G027701
AT1G027802
AT1G028101
AT1G028401
AT1G028501
AT1G028702
AT1G028801
AT1G029001
AT1G029201
AT1G030101
⋮⋮
AT5G661201
AT5G661701
AT5G662301
AT5G663001
AT5G663201
AT5G664401
AT5G664601
AT5G665101
AT5G665302
AT5G665401
AT5G665801
AT5G666001
AT5G666071
AT5G666801
AT5G666902
AT5G667702
AT5G668002
AT5G668602
AT5G668701
AT5G669202
AT5G671501
AT5G671801
AT5G672001
AT5G672202
AT5G672301
AT5G672401
AT5G672601
AT5G674701
AT5G675102
AT5G676201
In [15]:
Clust_Markers <- left_join(Clust_Markers, times_per_gene)
Joining, by = "gene"

In [16]:
summary(Clust_Markers$n)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  1.000   1.000   2.000   1.571   2.000   4.000 
In [17]:
# Load libraries for plotting
library(cowplot)
library(ComplexHeatmap)
library(circlize)
library(GeneOverlap)
library(gprofiler2)
library(ggrepel)
library(ggplot2)
********************************************************

Note: As of version 1.0.0, cowplot does not change the

  default ggplot2 theme anymore. To recover the previous

  behavior, execute:
  theme_set(theme_cowplot())

********************************************************


Loading required package: grid

========================================
ComplexHeatmap version 2.2.0
Bioconductor page: http://bioconductor.org/packages/ComplexHeatmap/
Github page: https://github.com/jokergoo/ComplexHeatmap
Documentation: http://jokergoo.github.io/ComplexHeatmap-reference

If you use it in published research, please cite:
Gu, Z. Complex heatmaps reveal patterns and correlations in multidimensional 
  genomic data. Bioinformatics 2016.
========================================


========================================
circlize version 0.4.8
CRAN page: https://cran.r-project.org/package=circlize
Github page: https://github.com/jokergoo/circlize
Documentation: http://jokergoo.github.io/circlize_book/book/

If you use it in published research, please cite:
Gu, Z. circlize implements and enhances circular visualization 
  in R. Bioinformatics 2014.
========================================


In [18]:
options(repr.plot.width = 16, repr.plot.height = 14)


markers_sel <- select(Clust_Markers, gene, cluster)

markers_list <- split(markers_sel, f=markers_sel$cluster)
 
#this makes list from long df of gene lists - TARGET is what we want to keep
markers_list  <- lapply(markers_list, function(x) x[names(x)=="gene"])
# convert each sublist into character and eliminate duplicates
markers_list  <- lapply(markers_list, function(x) as.character(unique(x$gene)))
 
## GeneOverlap 

# number of integrated features

genome_size <- 17513L

#compare all lists
gom.self <- newGOM(markers_list, markers_list, genome.size=genome_size)


int <- getNestedList(gom.self, "intersection")
int_matrix <- getMatrix(gom.self, "intersection")
p.val <- getMatrix(gom.self, "pval")
JC <- getMatrix(gom.self, "Jaccard")

# log of p.val for intersection
p.val_log <- -log10(p.val + 1e-200)


olap <- Heatmap(p.val_log, 
                name = "-log10_pval", 
                col = colorRamp2(c(0, 200), 
                                 c("beige", "red")), 
                column_title = "Number of shared marker genes", 
                cluster_rows = T,
                cluster_columns = T, 
                use_raster= FALSE, 
                show_column_names = TRUE, 
                show_row_names = TRUE, 
                show_row_dend = TRUE, 
                clustering_distance_rows = "pearson",
                clustering_distance_columns = "pearson", 
                show_column_dend = TRUE, cell_fun = function(j, i, x, y, width, height, fill) {grid.text(sprintf("%.0f", int_matrix[i, j]), x, y, gp = gpar(fontsize = 10))
}) 
                        
                        # padding - bottom, left, top, right
draw(olap, padding = unit(c(15, 5, 5, 10), "mm"), heatmap_legend_side = "left")
In [19]:
# Load GO terms for Arabidopsis thaliana
cluster_GO <- gost(markers_list, organism = "athaliana", correction_method = "fdr", significant = F, multi_query = F)

cluster_GO_df <- cluster_GO[[1]]

cluster_GO_sig <- filter(cluster_GO_df, p_value<=0.01)

# top  terms for each cluster

cluster_GO_sig %>%
  filter(source=="GO:BP", intersection_size>=4) %>%
  group_by(query) %>%
  top_n(5, wt = -p_value) %>%
  arrange(desc(p_value)) -> top_GO

GO_n <- cluster_GO_sig %>%
  filter(source=="GO:BP", intersection_size>=4) %>%
  group_by(term_id) %>%
  tally() %>%
  arrange(desc(n))


GO_n <- dplyr::rename(GO_n, "n_clusters"=n)

cluster_GO_sig_n <- left_join(cluster_GO_sig, GO_n)

# get all terms for the top ones so that all clusters have values

top_GO_all <- filter(cluster_GO_df, term_id %in% top_GO$term_id)


#spread and plot


top_GO_sel <- select(top_GO_all, query, p_value, term_id, term_name)

spread_GO <- spread(top_GO_sel, key = query, p_value)

spread_GO[is.na(spread_GO)] <- 1

spread_GO_m <- as.matrix(-log10(spread_GO[3:ncol(spread_GO)]))
rownames(spread_GO_m) <- spread_GO$term_name
Joining, by = "term_id"

In [20]:
options(repr.plot.width = 18, repr.plot.height = 20)

GO_hm <- Heatmap(spread_GO_m, 
                 name = "-log10_pval", 
                 heatmap_legend_param = list(title_position="topcenter", color_bar = "continuous"), 
                 col = colorRamp2(c(0, 10), 
                                  c("beige", "#e31a1c")), 
                 cluster_rows = T,
                 cluster_columns = T, 
                 use_raster= FALSE, 
                 show_column_names = TRUE, 
                 show_row_names = TRUE, 
                 show_row_dend = TRUE, 
                 show_column_dend = TRUE, 
                 clustering_distance_rows = "pearson",
                 clustering_distance_columns = "pearson", 
                 row_names_gp = gpar(fontsize = 12)) 


# padding - bottom, left, top, right
draw(GO_hm, padding = unit(c(15, 15, 5, 80), "mm"), heatmap_legend_side = "left")
In [21]:
# Load the known markers
(used.markers <- read_csv("./supp_data/Curated_Markers.csv"))
Parsed with column specification:
cols(
  Locus = col_character(),
  Gene = col_character(),
  Celltype = col_character(),
  Source = col_character()
)

A spec_tbl_df: 44 × 4
LocusGeneCelltypeSource
<chr><chr><chr><chr>
AT4G00490BAM2 Columella Plant Phys
AT1G62510AT1G62510Cortex Plant Phys
AT5G07990CYP75B1 Cortex Plant Phys
AT5G55250IAMT1 Cortex Plant Phys
AT1G61590AT1G61590Endodermis Plant Phys
AT4G02090AT4G02090Endodermis Plant Phys
AT3G11550CASP2 Endodermis Plant Phys
AT2G27370CASP3 Endodermis Plant Phys
AT5G06200CASP4 Endodermis Plant Phys
AT5G57620MYB36 Endodermis Plant Phys
AT5G42180PER64 Endodermis Plant Phys
AT1G33090AT1G33090Trichoblast Plant Phys
AT3G09330AT3G09330Trichoblast Plant Phys
AT5G49270COBL9 Trichoblast Plant Phys
AT1G48930GH9C1 Trichoblast Plant Phys
AT1G69240MES15 Trichoblast Plant Phys
AT1G45545WEL2 Trichoblast Plant Phys
AT4G37160sks15 Lateral Root CapPlant Phys
AT1G79840GL2 Atrichoblast Plant Phys
AT2G37260WRKY44 Atrichoblast Plant Phys
AT1G65310XTH17 Atrichoblast Plant Phys
AT1G79430APL Phloem Plant Phys
AT5G62940DOF5.6 Phloem Plant Phys
AT2G37090IRX9 Xylem Plant Phys
AT5G12870MYB46 Xylem Plant Phys
AT3G09070OPS Procambium Nagawa et al.
AT5G43810AGO10 Procambium Nagawa et al.
AT5G26930GATA23 Pericycle Beekman et al.
AT3G26120TEL1 Quiescent CenterDenyer et al.
AT3G43270PME32 Phloem Denyer et al.
AT1G68470AT1G68470Atrichoblast escoring
AT1G55440AT1G55440Trichoblast escoring
AT1G11330RDA2 Pericycle escoring
AT1G26790CDF6 Phloem escoring
AT3G05180AT3G05180Xylem escoring
AT3G55930AT3G55930Lateral Root Capescoring
AT5G36880ACS Lateral Root Capescoring
AT1G23210GH9B6 Columella escoring
AT5G57640AT5G57640Columella escoring
AT3G60650AT3G60650Columella escoring
AT1G13620RGF2 Columella escoring
AT1G17400DRO3 Columella escoring
AT1G55200AT1G55200Quiescent Centerescoring
AT5G45210AT5G45210Endodermis Clark et al.
In [22]:
used.markers$cluster_gene <- paste(used.markers$Celltype, used.markers$Locus, sep="_")
In [23]:
# Combine DE output to see whether the known markers are captured
Clust_Markers <- mutate(Clust_Markers, pct.diff=pct.1-pct.2)

Clust_Markers <- arrange(Clust_Markers, desc(pct.diff)) %>%
group_by(cluster) %>%
mutate(pct.diff_rank=dplyr::row_number()) %>%
arrange(desc(avg_diff)) %>%
mutate(avg_diff_rank=dplyr::row_number()) %>%
arrange(desc(myAUC)) %>%
mutate(myAUC_rank=dplyr::row_number()) %>%
mutate(combined_rank_raw=(pct.diff_rank + avg_diff_rank + myAUC_rank)/3) %>%
arrange(combined_rank_raw) %>%
mutate(combined_rank=dplyr::row_number()) %>%
select(-combined_rank_raw) %>%
mutate(known_marker=cluster_gene %in% used.markers$cluster_gene) %>%
arrange(combined_rank)
Clust_Markers
A grouped_df: 5425 × 16
myAUCavg_diffpowerpct.1pct.2clustergeneNamecluster_genenpct.diffpct.diff_rankavg_diff_rankmyAUC_rankcombined_rankknown_marker
<dbl><dbl><dbl><dbl><dbl><fct><chr><chr><chr><int><dbl><int><int><int><int><lgl>
0.9848.1612010.9680.9560.077Trichoblast AT1G23750AT1G23750Trichoblast_AT1G23750 10.879 1 1 11FALSE
0.9544.9911880.9080.9460.204Columella AT5G53460GLT1 Columella_AT5G53460 10.742 3 1 11FALSE
0.9224.5616890.8440.8290.076Lateral Root CapAT4G37160sks15 Lateral Root Cap_AT4G3716010.753 2 1 21 TRUE
0.9956.1210060.9900.9770.024Endodermis AT2G14900GASA7 Endodermis_AT2G14900 10.953 1 6 11FALSE
0.9865.2126180.9720.9790.068Cortex AT1G02850BGLU11 Cortex_AT1G02850 10.911 1 6 11FALSE
0.8774.6647940.7540.7670.076Atrichoblast AT5G44585AT5G44585Atrichoblast_AT5G44585 10.691 2 5 41FALSE
0.9333.7323600.8660.9390.226Pericycle AT1G27130GSTU13 Pericycle_AT1G27130 10.713 910 11FALSE
0.9293.3288090.8580.8970.146Procambium AT5G05690CYP90A1 Procambium_AT5G05690 10.751 221 21FALSE
0.9786.7889480.9560.9600.014Xylem AT5G03170FLA11 Xylem_AT5G03170 10.946 222 21FALSE
0.9824.8130680.9640.9730.071Phloem AT3G43270PME32 Phloem_AT3G43270 10.902 125 11 TRUE
0.9513.9601800.9020.9520.140Quiescent CenterAT4G16141AT4G16141Quiescent Center_AT4G1614120.8121013221FALSE
0.9553.3946510.9100.9450.139Stem Cell Niche AT3G15357AT3G15357Stem Cell Niche_AT3G15357 20.806 250131FALSE
0.9494.7883310.8980.8530.053Columella AT4G15530PPDK Columella_AT4G15530 10.800 1 2 22FALSE
0.9816.7612830.9620.9350.018Endodermis AT5G57620MYB36 Endodermis_AT5G57620 10.917 3 1 42 TRUE
0.9665.8972860.9320.9440.117Cortex AT5G65380DTX27 Cortex_AT5G65380 10.827 4 1 32FALSE
0.9224.1864200.8440.8030.080Lateral Root CapAT1G54010GLL23 Lateral Root Cap_AT1G5401010.723 3 3 32FALSE
0.9736.9607780.9460.9600.135Trichoblast AT5G40510AT5G40510Trichoblast_AT5G40510 10.825 2 7 22FALSE
0.8614.0379050.7220.7890.120Atrichoblast AT2G37130PER21 Atrichoblast_AT2G37130 10.669 5 8 72FALSE
0.9153.6431720.8300.8810.162Pericycle AT1G16350AT1G16350Pericycle_AT1G16350 10.719 711 62FALSE
0.9575.3036590.9140.9300.063Phloem AT1G78580TPS1 Phloem_AT1G78580 10.867 316 92FALSE
0.8794.7053790.7580.7450.069Procambium AT2G40480AT2G40480Procambium_AT2G40480 10.67611 2162FALSE
0.9846.4771890.9680.9630.006Xylem AT4G36160ANAC076 Xylem_AT4G36160 10.957 139 12FALSE
0.9454.0369930.8900.9240.105Quiescent CenterAT2G12646AT2G12646Quiescent Center_AT2G1264620.819 712422FALSE
0.9453.6575030.8900.9560.182Stem Cell Niche AT2G42740RPL11A Stem Cell Niche_AT2G42740 20.77410 6602FALSE
0.9746.7194330.9480.8710.012Endodermis AT2G22000PEP6 Endodermis_AT2G22000 10.859 6 2 53FALSE
0.9034.5634640.8060.7760.057Columella AT1G22880CEL5 Columella_AT1G22880 10.719 5 4 83FALSE
0.9448.0037850.8880.8370.115Trichoblast AT2G01540CAR10 Trichoblast_AT2G01540 10.72214 2 73FALSE
0.9023.1116980.8040.8590.186Atrichoblast AT3G29250SDR4 Atrichoblast_AT3G29250 10.673 418 23FALSE
0.9163.2420630.8320.8600.189Lateral Root CapAT3G16410NSP4 Lateral Root Cap_AT3G1641010.671 813 43FALSE
0.9313.1088850.8620.9520.222Pericycle AT4G34620RPS16-1 Pericycle_AT4G34620 10.730 521 33FALSE
⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮
0.7580.88170550.5160.6760.213Quiescent CenterAT1G11720ATSS3 Quiescent Center_AT1G1172010.4631526157215281607FALSE
0.7640.90343690.5280.7350.311Quiescent CenterAT2G47640AT2G47640Quiescent Center_AT2G4764020.4241609156514541608FALSE
0.7531.14080030.5060.6970.255Quiescent CenterAT4G09140MLH1 Quiescent Center_AT4G0914010.4421585145515941609FALSE
0.7520.96663520.5040.7100.235Quiescent CenterAT3G18240AT3G18240Quiescent Center_AT3G1824010.4751490153516121610FALSE
0.7590.89210200.5180.7010.250Quiescent CenterAT2G44270NCS6 Quiescent Center_AT2G4427020.4511560156715171611FALSE
0.7680.72468090.5360.7920.375Quiescent CenterAT5G56010HSP90-3 Quiescent Center_AT5G5601020.4171618163013981612FALSE
0.7630.87771230.5260.7070.279Quiescent CenterAT5G06060AT5G06060Quiescent Center_AT5G0606020.4281604157614661613FALSE
0.7550.92181260.5100.7210.257Quiescent CenterAT1G19520NFD5 Quiescent Center_AT1G1952020.4641525155715651614FALSE
0.7540.82999990.5080.7330.258Quiescent CenterAT3G61530KPHMT2 Quiescent Center_AT3G6153010.4751489159515761615FALSE
0.7501.17067800.5000.7000.266Quiescent CenterAT4G15640AT4G15640Quiescent Center_AT4G1564020.4341596143216331616FALSE
0.7501.05757880.5000.7010.243Quiescent CenterAT2G44040DAPB1 Quiescent Center_AT2G4404010.4581538149416341617FALSE
0.7551.04634680.5100.6610.234Quiescent CenterAT3G50340AT3G50340Quiescent Center_AT3G5034020.4271605150115641618FALSE
0.7620.75854820.5240.7020.258Quiescent CenterAT4G29430RPS15AE Quiescent Center_AT4G2943020.4441579161814831619FALSE
0.7561.02129370.5120.6700.256Quiescent CenterAT4G37660AT4G37660Quiescent Center_AT4G3766020.4141620151015501620FALSE
0.7620.81520830.5240.7760.350Quiescent CenterAT4G02450P23-1 Quiescent Center_AT4G0245020.4261607159714811621FALSE
0.7560.88981930.5120.7000.249Quiescent CenterAT4G26670TIM22-2 Quiescent Center_AT4G2667010.4511562156915541622FALSE
0.7531.12398990.5060.5260.198Quiescent CenterAT1G07820AT1G07820Quiescent Center_AT1G0782010.3281635146215951623FALSE
0.7530.83084450.5060.5880.117Quiescent CenterAT5G60250AT5G60250Quiescent Center_AT5G6025010.4711506159415971624FALSE
0.7620.81216030.5240.7560.344Quiescent CenterAT5G49510PFD3 Quiescent Center_AT5G4951010.4121626160014821625FALSE
0.7521.00979010.5040.6930.251Quiescent CenterAT1G19080TTN10 Quiescent Center_AT1G1908010.4421586151516111626FALSE
0.7510.91152090.5020.7090.248Quiescent CenterAT5G36210AT5G36210Quiescent Center_AT5G3621010.4611532156416251627FALSE
0.7630.70890990.5260.6960.282Quiescent CenterAT5G17710EMB1241 Quiescent Center_AT5G1771020.4141622163314671628FALSE
0.7580.71914100.5160.7220.271Quiescent CenterAT1G73720SMU1 Quiescent Center_AT1G7372010.4511561163115311629FALSE
0.7540.81274630.5080.7200.266Quiescent CenterAT3G04710TPR10 Quiescent Center_AT3G0471010.4541551159815771630FALSE
0.7580.72745300.5160.7100.261Quiescent CenterAT2G42300BHLH48 Quiescent Center_AT2G4230010.4491570162815301631FALSE
0.7560.92015390.5120.7190.326Quiescent CenterAT4G19700BOI Quiescent Center_AT4G1970020.3931633155915521632FALSE
0.7540.83938150.5080.7010.260Quiescent CenterAT2G22230AT2G22230Quiescent Center_AT2G2223020.4411587159015751633FALSE
0.7500.79457350.5000.6440.186Quiescent CenterAT3G46550FLA4 Quiescent Center_AT3G4655010.4581537160616361634FALSE
0.7510.93140000.5020.6870.264Quiescent CenterAT5G55230ATMAP65-1Quiescent Center_AT5G5523010.4231611155216241635FALSE
0.7570.69846460.5140.7210.326Quiescent CenterAT3G48560ALS Quiescent Center_AT3G4856010.3951632163615441636FALSE
In [24]:
# Store the data
write.csv(Clust_Markers, "./supp_data/Atlas_celltype_markers_ROC.csv", row.names=F)
In [25]:
# Plotting the expression pattern of known markers 
used.markers.to.plt <- used.markers

used.markers.to.plt$cluster <- used.markers.to.plt$Celltype

used.markers.to.plt$cluster <- factor(used.markers.to.plt$cluster, levels= c("Quiescent Center", "Stem Cell Niche", "Columella", "Lateral Root Cap", "Atrichoblast", "Trichoblast", "Cortex", "Endodermis", "Pericycle", "Phloem", "Xylem", "Procambium"))

used.markers.to.plt <- arrange(used.markers.to.plt, cluster)

used.markers.to.plt

ct_to_plt_Names <- rev(used.markers.to.plt$Gene)
ct_to_plt_genes <- rev(used.markers.to.plt$Locus)
breaks <- rev(ct_to_plt_genes)
labels <- rev(ct_to_plt_Names)
A spec_tbl_df: 44 × 6
LocusGeneCelltypeSourcecluster_genecluster
<chr><chr><chr><chr><chr><fct>
AT3G26120TEL1 Quiescent CenterDenyer et al. Quiescent Center_AT3G26120Quiescent Center
AT1G55200AT1G55200Quiescent Centerescoring Quiescent Center_AT1G55200Quiescent Center
AT4G00490BAM2 Columella Plant Phys Columella_AT4G00490 Columella
AT1G23210GH9B6 Columella escoring Columella_AT1G23210 Columella
AT5G57640AT5G57640Columella escoring Columella_AT5G57640 Columella
AT3G60650AT3G60650Columella escoring Columella_AT3G60650 Columella
AT1G13620RGF2 Columella escoring Columella_AT1G13620 Columella
AT1G17400DRO3 Columella escoring Columella_AT1G17400 Columella
AT4G37160sks15 Lateral Root CapPlant Phys Lateral Root Cap_AT4G37160Lateral Root Cap
AT3G55930AT3G55930Lateral Root Capescoring Lateral Root Cap_AT3G55930Lateral Root Cap
AT5G36880ACS Lateral Root Capescoring Lateral Root Cap_AT5G36880Lateral Root Cap
AT1G79840GL2 Atrichoblast Plant Phys Atrichoblast_AT1G79840 Atrichoblast
AT2G37260WRKY44 Atrichoblast Plant Phys Atrichoblast_AT2G37260 Atrichoblast
AT1G65310XTH17 Atrichoblast Plant Phys Atrichoblast_AT1G65310 Atrichoblast
AT1G68470AT1G68470Atrichoblast escoring Atrichoblast_AT1G68470 Atrichoblast
AT1G33090AT1G33090Trichoblast Plant Phys Trichoblast_AT1G33090 Trichoblast
AT3G09330AT3G09330Trichoblast Plant Phys Trichoblast_AT3G09330 Trichoblast
AT5G49270COBL9 Trichoblast Plant Phys Trichoblast_AT5G49270 Trichoblast
AT1G48930GH9C1 Trichoblast Plant Phys Trichoblast_AT1G48930 Trichoblast
AT1G69240MES15 Trichoblast Plant Phys Trichoblast_AT1G69240 Trichoblast
AT1G45545WEL2 Trichoblast Plant Phys Trichoblast_AT1G45545 Trichoblast
AT1G55440AT1G55440Trichoblast escoring Trichoblast_AT1G55440 Trichoblast
AT1G62510AT1G62510Cortex Plant Phys Cortex_AT1G62510 Cortex
AT5G07990CYP75B1 Cortex Plant Phys Cortex_AT5G07990 Cortex
AT5G55250IAMT1 Cortex Plant Phys Cortex_AT5G55250 Cortex
AT1G61590AT1G61590Endodermis Plant Phys Endodermis_AT1G61590 Endodermis
AT4G02090AT4G02090Endodermis Plant Phys Endodermis_AT4G02090 Endodermis
AT3G11550CASP2 Endodermis Plant Phys Endodermis_AT3G11550 Endodermis
AT2G27370CASP3 Endodermis Plant Phys Endodermis_AT2G27370 Endodermis
AT5G06200CASP4 Endodermis Plant Phys Endodermis_AT5G06200 Endodermis
AT5G57620MYB36 Endodermis Plant Phys Endodermis_AT5G57620 Endodermis
AT5G42180PER64 Endodermis Plant Phys Endodermis_AT5G42180 Endodermis
AT5G45210AT5G45210Endodermis Clark et al. Endodermis_AT5G45210 Endodermis
AT5G26930GATA23 Pericycle Beekman et al.Pericycle_AT5G26930 Pericycle
AT1G11330RDA2 Pericycle escoring Pericycle_AT1G11330 Pericycle
AT1G79430APL Phloem Plant Phys Phloem_AT1G79430 Phloem
AT5G62940DOF5.6 Phloem Plant Phys Phloem_AT5G62940 Phloem
AT3G43270PME32 Phloem Denyer et al. Phloem_AT3G43270 Phloem
AT1G26790CDF6 Phloem escoring Phloem_AT1G26790 Phloem
AT2G37090IRX9 Xylem Plant Phys Xylem_AT2G37090 Xylem
AT5G12870MYB46 Xylem Plant Phys Xylem_AT5G12870 Xylem
AT3G05180AT3G05180Xylem escoring Xylem_AT3G05180 Xylem
AT3G09070OPS Procambium Nagawa et al. Procambium_AT3G09070 Procambium
AT5G43810AGO10 Procambium Nagawa et al. Procambium_AT5G43810 Procambium
In [26]:
rc.integrated$celltype.anno <- fct_rev(rc.integrated$celltype.anno)

Idents(rc.integrated) <- "celltype.anno"
In [27]:
options(repr.plot.width=14, repr.plot.height=8)
dot <- DotPlot(object = rc.integrated, features = ct_to_plt_genes, cols = c("white", "red")) + RotatedAxis() + ylab("") + 
scale_x_discrete(breaks=breaks, labels=labels)
dot
In [28]:
# top genes to plot

novel_markers <- Clust_Markers %>%
group_by(cluster) %>%
top_n(2, -combined_rank)

novel_markers$cluster <- factor(novel_markers$cluster, levels= c("Quiescent Center", "Stem Cell Niche", "Columella", "Lateral Root Cap", "Atrichoblast", "Trichoblast", "Cortex", "Endodermis", "Pericycle", "Phloem", "Xylem", "Procambium"))

novel_markers <- arrange(novel_markers, cluster)

novel_markers

novel_markers_sel <- select(novel_markers, cluster, gene, Name)

ct_to_plt_Names <- rev(novel_markers_sel$Name)
ct_to_plt_genes <- rev(novel_markers_sel$gene)
A grouped_df: 24 × 16
myAUCavg_diffpowerpct.1pct.2clustergeneNamecluster_genenpct.diffpct.diff_rankavg_diff_rankmyAUC_rankcombined_rankknown_marker
<dbl><dbl><dbl><dbl><dbl><fct><chr><chr><chr><int><dbl><int><int><int><int><lgl>
0.9513.9601800.9020.9520.140Quiescent CenterAT4G16141AT4G16141Quiescent Center_AT4G1614120.8121013221FALSE
0.9454.0369930.8900.9240.105Quiescent CenterAT2G12646AT2G12646Quiescent Center_AT2G1264620.819 712422FALSE
0.9553.3946510.9100.9450.139Stem Cell Niche AT3G15357AT3G15357Stem Cell Niche_AT3G15357 20.806 250131FALSE
0.9453.6575030.8900.9560.182Stem Cell Niche AT2G42740RPL11A Stem Cell Niche_AT2G42740 20.77410 6602FALSE
0.9544.9911880.9080.9460.204Columella AT5G53460GLT1 Columella_AT5G53460 10.742 3 1 11FALSE
0.9494.7883310.8980.8530.053Columella AT4G15530PPDK Columella_AT4G15530 10.800 1 2 22FALSE
0.9224.5616890.8440.8290.076Lateral Root CapAT4G37160sks15 Lateral Root Cap_AT4G3716010.753 2 1 21 TRUE
0.9224.1864200.8440.8030.080Lateral Root CapAT1G54010GLL23 Lateral Root Cap_AT1G5401010.723 3 3 32FALSE
0.8774.6647940.7540.7670.076Atrichoblast AT5G44585AT5G44585Atrichoblast_AT5G44585 10.691 2 5 41FALSE
0.8614.0379050.7220.7890.120Atrichoblast AT2G37130PER21 Atrichoblast_AT2G37130 10.669 5 8 72FALSE
0.9848.1612010.9680.9560.077Trichoblast AT1G23750AT1G23750Trichoblast_AT1G23750 10.879 1 1 11FALSE
0.9736.9607780.9460.9600.135Trichoblast AT5G40510AT5G40510Trichoblast_AT5G40510 10.825 2 7 22FALSE
0.9865.2126180.9720.9790.068Cortex AT1G02850BGLU11 Cortex_AT1G02850 10.911 1 6 11FALSE
0.9665.8972860.9320.9440.117Cortex AT5G65380DTX27 Cortex_AT5G65380 10.827 4 1 32FALSE
0.9956.1210060.9900.9770.024Endodermis AT2G14900GASA7 Endodermis_AT2G14900 10.953 1 6 11FALSE
0.9816.7612830.9620.9350.018Endodermis AT5G57620MYB36 Endodermis_AT5G57620 10.917 3 1 42 TRUE
0.9333.7323600.8660.9390.226Pericycle AT1G27130GSTU13 Pericycle_AT1G27130 10.713 910 11FALSE
0.9153.6431720.8300.8810.162Pericycle AT1G16350AT1G16350Pericycle_AT1G16350 10.719 711 62FALSE
0.9824.8130680.9640.9730.071Phloem AT3G43270PME32 Phloem_AT3G43270 10.902 125 11 TRUE
0.9575.3036590.9140.9300.063Phloem AT1G78580TPS1 Phloem_AT1G78580 10.867 316 92FALSE
0.9786.7889480.9560.9600.014Xylem AT5G03170FLA11 Xylem_AT5G03170 10.946 222 21FALSE
0.9846.4771890.9680.9630.006Xylem AT4G36160ANAC076 Xylem_AT4G36160 10.957 139 12FALSE
0.9293.3288090.8580.8970.146Procambium AT5G05690CYP90A1 Procambium_AT5G05690 10.751 221 21FALSE
0.8794.7053790.7580.7450.069Procambium AT2G40480AT2G40480Procambium_AT2G40480 10.67611 2162FALSE
In [29]:
(breaks <- rev(ct_to_plt_genes))
  1. 'AT4G16141'
  2. 'AT2G12646'
  3. 'AT3G15357'
  4. 'AT2G42740'
  5. 'AT5G53460'
  6. 'AT4G15530'
  7. 'AT4G37160'
  8. 'AT1G54010'
  9. 'AT5G44585'
  10. 'AT2G37130'
  11. 'AT1G23750'
  12. 'AT5G40510'
  13. 'AT1G02850'
  14. 'AT5G65380'
  15. 'AT2G14900'
  16. 'AT5G57620'
  17. 'AT1G27130'
  18. 'AT1G16350'
  19. 'AT3G43270'
  20. 'AT1G78580'
  21. 'AT5G03170'
  22. 'AT4G36160'
  23. 'AT5G05690'
  24. 'AT2G40480'
In [30]:
(labels <- rev(ct_to_plt_Names))
  1. 'AT4G16141'
  2. 'AT2G12646'
  3. 'AT3G15357'
  4. 'RPL11A'
  5. 'GLT1'
  6. 'PPDK'
  7. 'sks15'
  8. 'GLL23'
  9. 'AT5G44585'
  10. 'PER21'
  11. 'AT1G23750'
  12. 'AT5G40510'
  13. 'BGLU11'
  14. 'DTX27'
  15. 'GASA7'
  16. 'MYB36'
  17. 'GSTU13'
  18. 'AT1G16350'
  19. 'PME32'
  20. 'TPS1'
  21. 'FLA11'
  22. 'ANAC076'
  23. 'CYP90A1'
  24. 'AT2G40480'
In [31]:
options(repr.plot.width=10, repr.plot.height=6)
dot <- DotPlot(object = rc.integrated, features = ct_to_plt_genes, cols = c("white", "red")) + RotatedAxis() + ylab("") + 
scale_x_discrete(breaks=breaks, labels=labels)
dot

Specific genes by cell type and developmental stage

In [32]:
table(rc.integrated$time.celltype.anno)
           Elongation-Atrichoblast               Elongation-Columella 
                              5223                               2405 
                 Elongation-Cortex              Elongation-Endodermis 
                              5698                               4801 
       Elongation-Lateral Root Cap               Elongation-Pericycle 
                              4273                               6265 
                 Elongation-Phloem              Elongation-Procambium 
                              4078                               6275 
            Elongation-Trichoblast                   Elongation-Xylem 
                              4598                               2752 
           Maturation-Atrichoblast               Maturation-Columella 
                              3661                               6834 
                 Maturation-Cortex              Maturation-Endodermis 
                              2822                               4273 
       Maturation-Lateral Root Cap               Maturation-Pericycle 
                              2780                               3670 
                 Maturation-Phloem              Maturation-Procambium 
                              1117                               2662 
            Maturation-Trichoblast                   Maturation-Xylem 
                              3881                               1618 
             Meristem-Atrichoblast                 Meristem-Columella 
                              4096                               3600 
                   Meristem-Cortex                Meristem-Endodermis 
                              1686                               1405 
         Meristem-Lateral Root Cap                 Meristem-Pericycle 
                              6895                               1643 
                   Meristem-Phloem                Meristem-Procambium 
                              1546                               2945 
Meristem-Putative Quiescent Center           Meristem-Stem Cell Niche 
                              1195                               1807 
              Meristem-Trichoblast                     Meristem-Xylem 
                              3330                                593 
In [33]:
### combination of time and cell type anno

rc.integrated$cell_time_final <- rc.integrated$time.celltype.anno
In [34]:
rc.integrated$cell_time_final <- gsub("Meristem", "Meristematic", rc.integrated$cell_time_final, ignore.case = FALSE, perl = FALSE,
     fixed = T, useBytes = FALSE)

rc.integrated$cell_time_final <- gsub("Elongation", "Elongating", rc.integrated$cell_time_final, ignore.case = FALSE, perl = FALSE,
     fixed = T, useBytes = FALSE)

rc.integrated$cell_time_final <- gsub("Maturation", "Mature", rc.integrated$cell_time_final, ignore.case = FALSE, perl = FALSE,
     fixed = T, useBytes = FALSE)

# Meristematic-Putative Quiescent Center

rc.integrated$cell_time_final <- gsub("Meristematic-Putative Quiescent Center", "Meristematic-Quiescent Center", rc.integrated$cell_time_final, ignore.case = FALSE, perl = FALSE,
     fixed = T, useBytes = FALSE)
In [35]:
table(rc.integrated$cell_time_final)
      Elongating-Atrichoblast          Elongating-Columella 
                         5223                          2405 
            Elongating-Cortex         Elongating-Endodermis 
                         5698                          4801 
  Elongating-Lateral Root Cap          Elongating-Pericycle 
                         4273                          6265 
            Elongating-Phloem         Elongating-Procambium 
                         4078                          6275 
       Elongating-Trichoblast              Elongating-Xylem 
                         4598                          2752 
          Mature-Atrichoblast              Mature-Columella 
                         3661                          6834 
                Mature-Cortex             Mature-Endodermis 
                         2822                          4273 
      Mature-Lateral Root Cap              Mature-Pericycle 
                         2780                          3670 
                Mature-Phloem             Mature-Procambium 
                         1117                          2662 
           Mature-Trichoblast                  Mature-Xylem 
                         3881                          1618 
    Meristematic-Atrichoblast        Meristematic-Columella 
                         4096                          3600 
          Meristematic-Cortex       Meristematic-Endodermis 
                         1686                          1405 
Meristematic-Lateral Root Cap        Meristematic-Pericycle 
                         6895                          1643 
          Meristematic-Phloem       Meristematic-Procambium 
                         1546                          2945 
Meristematic-Quiescent Center  Meristematic-Stem Cell Niche 
                         1195                          1807 
     Meristematic-Trichoblast            Meristematic-Xylem 
                         3330                           593 
In [36]:
Idents(rc.integrated) <- "cell_time_final"
DefaultAssay(rc.integrated) <- "integrated"

cell_time_Clust_Markers <- FindAllMarkers(rc.integrated,
                                logfc.threshold=log(2),
                                min.diff.pct = 0.25,
                                max.cells.per.ident = 10000,
                                only.pos=T, 
                               test.use="roc")
Calculating cluster Meristematic-Atrichoblast

Calculating cluster Elongating-Atrichoblast

Calculating cluster Elongating-Cortex

Calculating cluster Mature-Columella

Calculating cluster Meristematic-Lateral Root Cap

Calculating cluster Elongating-Pericycle

Calculating cluster Elongating-Xylem

Calculating cluster Elongating-Lateral Root Cap

Calculating cluster Mature-Pericycle

Calculating cluster Elongating-Endodermis

Calculating cluster Elongating-Phloem

Calculating cluster Mature-Procambium

Calculating cluster Meristematic-Quiescent Center

Calculating cluster Mature-Endodermis

Calculating cluster Mature-Trichoblast

Calculating cluster Mature-Atrichoblast

Calculating cluster Mature-Cortex

Calculating cluster Meristematic-Phloem

Calculating cluster Elongating-Columella

Calculating cluster Elongating-Procambium

Calculating cluster Meristematic-Endodermis

Calculating cluster Mature-Xylem

Calculating cluster Elongating-Trichoblast

Calculating cluster Mature-Lateral Root Cap

Calculating cluster Meristematic-Columella

Calculating cluster Mature-Phloem

Calculating cluster Meristematic-Stem Cell Niche

Calculating cluster Meristematic-Procambium

Calculating cluster Meristematic-Trichoblast

Calculating cluster Meristematic-Pericycle

Calculating cluster Meristematic-Cortex

Calculating cluster Meristematic-Xylem

In [37]:
cell_time_Clust_Markers
A data.frame: 24409 × 7
myAUCavg_diffpowerpct.1pct.2clustergene
<dbl><dbl><dbl><dbl><dbl><fct><chr>
AT2G450500.9683.68343850.9360.9920.212Meristematic-AtrichoblastAT2G45050
AT2G208000.9642.97067320.9280.9760.199Meristematic-AtrichoblastAT2G20800
AT5G515000.9624.48745800.9240.9610.130Meristematic-AtrichoblastAT5G51500
AT4G222300.9594.38606620.9180.9480.134Meristematic-AtrichoblastAT4G22230
AT5G426300.9573.61837320.9140.9710.172Meristematic-AtrichoblastAT5G42630
AT1G319500.9562.99407970.9120.9810.179Meristematic-AtrichoblastAT1G31950
AT3G605300.9503.44696020.9000.9660.159Meristematic-AtrichoblastAT3G60530
AT5G445850.9483.58811180.8960.9310.128Meristematic-AtrichoblastAT5G44585
AT3G050200.9472.69302500.8940.9790.296Meristematic-AtrichoblastAT3G05020
AT1G548900.9454.39368010.8900.9270.121Meristematic-AtrichoblastAT1G54890
AT5G485800.9392.33613780.8780.9810.302Meristematic-AtrichoblastAT5G48580
AT2G337900.9333.20622890.8660.9060.138Meristematic-AtrichoblastAT2G33790
AT2G244000.9322.56662250.8640.9550.174Meristematic-AtrichoblastAT2G24400
AT4G313200.9312.47597510.8620.9600.260Meristematic-AtrichoblastAT4G31320
AT2G404750.9282.33797120.8560.9440.192Meristematic-AtrichoblastAT2G40475
AT1G282900.9282.00304570.8560.9900.211Meristematic-AtrichoblastAT1G28290
AT4G222350.9272.89853200.8540.9060.135Meristematic-AtrichoblastAT4G22235
AT1G269450.9252.61026180.8500.9220.139Meristematic-AtrichoblastAT1G26945
AT5G403300.9243.59857290.8480.9100.176Meristematic-AtrichoblastAT5G40330
AT1G135900.9232.63923440.8460.9540.220Meristematic-AtrichoblastAT1G13590
AT1G745000.9222.59912110.8440.9470.209Meristematic-AtrichoblastAT1G74500
AT5G665900.9193.71772810.8380.9170.188Meristematic-AtrichoblastAT5G66590
AT5G541000.9161.37950430.8320.9690.316Meristematic-AtrichoblastAT5G54100
AT2G205150.9141.45585520.8280.9190.174Meristematic-AtrichoblastAT2G20515
AT1G744900.9141.40725270.8280.9510.206Meristematic-AtrichoblastAT1G74490
AT1G540000.9102.15091670.8200.9260.233Meristematic-AtrichoblastAT1G54000
AT1G172850.9101.30470830.8200.9620.255Meristematic-AtrichoblastAT1G17285
AT1G798400.9083.12235860.8160.8870.107Meristematic-AtrichoblastAT1G79840
AT1G052100.9060.99494950.8120.9560.242Meristematic-AtrichoblastAT1G05210
AT2G211600.9051.54692440.8100.9760.354Meristematic-AtrichoblastAT2G21160
⋮⋮⋮⋮⋮⋮⋮⋮
AT1G3694020.7061.67102280.4120.6240.168Meristematic-XylemAT1G36940
AT3G255800.7061.59907150.4120.6730.289Meristematic-XylemAT3G25580
AT1G7123010.7061.28358090.4120.6420.274Meristematic-XylemAT1G71230
AT2G319020.7061.16219280.4120.6140.214Meristematic-XylemAT2G31902
AT1G565900.7060.99636770.4120.6420.301Meristematic-XylemAT1G56590
AT5G561400.7060.70092150.4120.6730.328Meristematic-XylemAT5G56140
AT1G2769020.7052.28901960.4100.6580.174Meristematic-XylemAT1G27690
AT5G0810020.7050.94102390.4100.6800.326Meristematic-XylemAT5G08100
AT4G0402520.7042.81281690.4080.6000.095Meristematic-XylemAT4G04025
AT3G1561010.7041.68247150.4080.6730.294Meristematic-XylemAT3G15610
AT1G7663010.7041.32225660.4080.6410.238Meristematic-XylemAT1G76630
AT5G1909020.7041.06244090.4080.6510.216Meristematic-XylemAT5G19090
AT2G179800.7032.36144920.4060.6490.295Meristematic-XylemAT2G17980
AT3G0932020.7032.15221370.4060.6490.283Meristematic-XylemAT3G09320
AT2G283700.7032.11561770.4060.6910.338Meristematic-XylemAT2G28370
AT4G1524810.7031.52163650.4060.5580.194Meristematic-XylemAT4G15248
AT2G2823030.7031.45248250.4060.6690.289Meristematic-XylemAT2G28230
AT3G5552010.7031.03754780.4060.6410.324Meristematic-XylemAT3G55520
AT3G6328040.7030.87439480.4060.6100.164Meristematic-XylemAT3G63280
AT5G0980510.7023.00435240.4040.5600.050Meristematic-XylemAT5G09805
AT1G7965010.7021.99068900.4040.6690.290Meristematic-XylemAT1G79650
AT2G2797030.7021.19058200.4040.6440.239Meristematic-XylemAT2G27970
AT4G2973020.7020.98954950.4040.6320.220Meristematic-XylemAT4G29730
AT2G2670020.7012.72275640.4020.5920.087Meristematic-XylemAT2G26700
AT2G249450.7012.33047900.4020.6410.189Meristematic-XylemAT2G24945
AT3G0164010.7012.20771020.4020.6660.319Meristematic-XylemAT3G01640
AT3G1931040.7011.62233060.4020.6540.089Meristematic-XylemAT3G19310
AT3G1957010.7011.11179110.4020.6340.246Meristematic-XylemAT3G19570
AT4G1752040.7010.81199220.4020.6640.275Meristematic-XylemAT4G17520
AT5G6744010.7010.72581820.4020.6140.272Meristematic-XylemAT5G67440
In [38]:
cell_time_Clust_Markers %>%
group_by(cluster) %>%
tally()
A tibble: 32 × 2
clustern
<fct><int>
Meristematic-Atrichoblast 816
Elongating-Atrichoblast 375
Elongating-Cortex 636
Mature-Columella 506
Meristematic-Lateral Root Cap 603
Elongating-Pericycle 499
Elongating-Xylem 698
Elongating-Lateral Root Cap 289
Mature-Pericycle 468
Elongating-Endodermis 508
Elongating-Phloem 598
Mature-Procambium 563
Meristematic-Quiescent Center2270
Mature-Endodermis 331
Mature-Trichoblast 702
Mature-Atrichoblast 540
Mature-Cortex 544
Meristematic-Phloem 1146
Elongating-Columella 423
Elongating-Procambium 611
Meristematic-Endodermis 893
Mature-Xylem 1118
Elongating-Trichoblast 719
Mature-Lateral Root Cap 387
Meristematic-Columella 680
Mature-Phloem 884
Meristematic-Stem Cell Niche 1702
Meristematic-Procambium 910
Meristematic-Trichoblast 1038
Meristematic-Pericycle 987
Meristematic-Cortex 986
Meristematic-Xylem 979
In [39]:
cell_time_Clust_Markers %>%
filter(myAUC>=0.75) %>%
group_by(cluster) %>%
tally()
A tibble: 32 × 2
clustern
<fct><int>
Meristematic-Atrichoblast 668
Elongating-Atrichoblast 262
Elongating-Cortex 436
Mature-Columella 313
Meristematic-Lateral Root Cap 348
Elongating-Pericycle 239
Elongating-Xylem 455
Elongating-Lateral Root Cap 189
Mature-Pericycle 326
Elongating-Endodermis 378
Elongating-Phloem 389
Mature-Procambium 385
Meristematic-Quiescent Center1636
Mature-Endodermis 184
Mature-Trichoblast 533
Mature-Atrichoblast 370
Mature-Cortex 340
Meristematic-Phloem 692
Elongating-Columella 215
Elongating-Procambium 361
Meristematic-Endodermis 672
Mature-Xylem 881
Elongating-Trichoblast 528
Mature-Lateral Root Cap 277
Meristematic-Columella 334
Mature-Phloem 544
Meristematic-Stem Cell Niche 1136
Meristematic-Procambium 603
Meristematic-Trichoblast 709
Meristematic-Pericycle 621
Meristematic-Cortex 734
Meristematic-Xylem 750
In [40]:
# store all 

all_cell_time_Clust_Markers <- cell_time_Clust_Markers
In [41]:
# keep only markers 0.75 and above
cell_time_Clust_Markers <- filter(cell_time_Clust_Markers, myAUC>=0.75)
In [42]:
(times_per_gene <- cell_time_Clust_Markers %>%
ungroup() %>%
group_by(gene) %>%
tally())
A tibble: 7867 × 2
genen
<chr><int>
AT1G010102
AT1G010302
AT1G010502
AT1G010702
AT1G010902
AT1G011006
AT1G011102
AT1G011201
AT1G011701
AT1G011802
AT1G012301
AT1G012401
AT1G013002
AT1G013101
AT1G013602
AT1G013802
AT1G014304
AT1G014901
AT1G015402
AT1G015502
AT1G015703
AT1G015804
AT1G016202
AT1G017502
AT1G017702
AT1G017802
AT1G018304
AT1G019003
AT1G019101
AT1G019402
⋮⋮
AT5G668703
AT5G668801
AT5G669203
AT5G670201
AT5G670703
AT5G670902
AT5G671402
AT5G671501
AT5G671601
AT5G671801
AT5G672001
AT5G672102
AT5G672203
AT5G672302
AT5G672401
AT5G672601
AT5G672802
AT5G673001
AT5G673401
AT5G673603
AT5G673902
AT5G674001
AT5G674401
AT5G674501
AT5G674602
AT5G674702
AT5G675103
AT5G675901
AT5G676003
AT5G676201
In [43]:
cell_time_Clust_Markers <- left_join(cell_time_Clust_Markers, times_per_gene)
Joining, by = "gene"

In [44]:
cell_time_Clust_Markers <- left_join(cell_time_Clust_Markers, feature_names)
Joining, by = "gene"

In [45]:
cell_time_Clust_Markers$cluster_gene <- paste(cell_time_Clust_Markers$cluster, Clust_Markers$gene, sep="_")

Rank AUC dataset for celltype/dev combo

In [46]:
cell_time_Clust_Markers <- mutate(cell_time_Clust_Markers, pct.diff=pct.1-pct.2)
cell_time_Clust_Markers
A data.frame: 16508 × 11
myAUCavg_diffpowerpct.1pct.2clustergenenNamecluster_genepct.diff
<dbl><dbl><dbl><dbl><dbl><fct><chr><int><chr><chr><dbl>
0.9683.68343850.9360.9920.212Meristematic-AtrichoblastAT2G450504GATA2 Meristematic-Atrichoblast_AT1G237500.780
0.9642.97067320.9280.9760.199Meristematic-AtrichoblastAT2G208002NDB4 Meristematic-Atrichoblast_AT5G534600.777
0.9624.48745800.9240.9610.130Meristematic-AtrichoblastAT5G515001PME60 Meristematic-Atrichoblast_AT4G371600.831
0.9594.38606620.9180.9480.134Meristematic-AtrichoblastAT4G222302AT4G22230Meristematic-Atrichoblast_AT2G149000.814
0.9573.61837320.9140.9710.172Meristematic-AtrichoblastAT5G426303KAN4 Meristematic-Atrichoblast_AT1G028500.799
0.9562.99407970.9120.9810.179Meristematic-AtrichoblastAT1G319503AT1G31950Meristematic-Atrichoblast_AT5G445850.802
0.9503.44696020.9000.9660.159Meristematic-AtrichoblastAT3G605303GATA4 Meristematic-Atrichoblast_AT1G271300.807
0.9483.58811180.8960.9310.128Meristematic-AtrichoblastAT5G445852AT5G44585Meristematic-Atrichoblast_AT5G056900.803
0.9472.69302500.8940.9790.296Meristematic-AtrichoblastAT3G050203ACP1 Meristematic-Atrichoblast_AT5G031700.683
0.9454.39368010.8900.9270.121Meristematic-AtrichoblastAT1G548901AT1G54890Meristematic-Atrichoblast_AT3G432700.806
0.9392.33613780.8780.9810.302Meristematic-AtrichoblastAT5G485805FKBP15-2 Meristematic-Atrichoblast_AT4G161410.679
0.9333.20622890.8660.9060.138Meristematic-AtrichoblastAT2G337902AGP30 Meristematic-Atrichoblast_AT3G153570.768
0.9322.56662250.8640.9550.174Meristematic-AtrichoblastAT2G244003AT2G24400Meristematic-Atrichoblast_AT4G155300.781
0.9312.47597510.8620.9600.260Meristematic-AtrichoblastAT4G313203AT4G31320Meristematic-Atrichoblast_AT5G576200.700
0.9282.33797120.8560.9440.192Meristematic-AtrichoblastAT2G404753AT2G40475Meristematic-Atrichoblast_AT5G653800.752
0.9282.00304570.8560.9900.211Meristematic-AtrichoblastAT1G282903AGP31 Meristematic-Atrichoblast_AT1G540100.779
0.9272.89853200.8540.9060.135Meristematic-AtrichoblastAT4G222351AT4G22235Meristematic-Atrichoblast_AT5G405100.771
0.9252.61026180.8500.9220.139Meristematic-AtrichoblastAT1G269453PRE6 Meristematic-Atrichoblast_AT2G371300.783
0.9243.59857290.8480.9100.176Meristematic-AtrichoblastAT5G403303MYB23 Meristematic-Atrichoblast_AT1G163500.734
0.9232.63923440.8460.9540.220Meristematic-AtrichoblastAT1G135904PSK1 Meristematic-Atrichoblast_AT1G785800.734
0.9222.59912110.8440.9470.209Meristematic-AtrichoblastAT1G745004PRE3 Meristematic-Atrichoblast_AT2G404800.738
0.9193.71772810.8380.9170.188Meristematic-AtrichoblastAT5G665902AT5G66590Meristematic-Atrichoblast_AT4G361600.729
0.9161.37950430.8320.9690.316Meristematic-AtrichoblastAT5G541003AT5G54100Meristematic-Atrichoblast_AT2G126460.653
0.9141.45585520.8280.9190.174Meristematic-AtrichoblastAT2G205155AT2G20515Meristematic-Atrichoblast_AT2G427400.745
0.9141.40725270.8280.9510.206Meristematic-AtrichoblastAT1G744903AT1G74490Meristematic-Atrichoblast_AT2G220000.745
0.9102.15091670.8200.9260.233Meristematic-AtrichoblastAT1G540004GLL22 Meristematic-Atrichoblast_AT1G228800.693
0.9101.30470830.8200.9620.255Meristematic-AtrichoblastAT1G172857AT1G17285Meristematic-Atrichoblast_AT2G015400.707
0.9083.12235860.8160.8870.107Meristematic-AtrichoblastAT1G798401GL2 Meristematic-Atrichoblast_AT3G292500.780
0.9060.99494950.8120.9560.242Meristematic-AtrichoblastAT1G052103AT1G05210Meristematic-Atrichoblast_AT3G164100.714
0.9051.54692440.8100.9760.354Meristematic-AtrichoblastAT2G211605AT2G21160Meristematic-Atrichoblast_AT4G346200.622
⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮
0.7561.43955520.5120.7180.274Meristematic-XylemAT3G205602PDIL5-3 Meristematic-Xylem_AT5G487600.444
0.7560.91899960.5120.7420.308Meristematic-XylemAT3G595001AT3G59500Meristematic-Xylem_AT4G125450.434
0.7560.70691490.5120.7180.261Meristematic-XylemAT3G452305AT3G45230Meristematic-Xylem_AT1G627000.457
0.7551.99523020.5100.6270.124Meristematic-XylemAT1G186503PDCB3 Meristematic-Xylem_AT5G477200.503
0.7551.39760840.5100.5850.072Meristematic-XylemAT3G630504AT3G63050Meristematic-Xylem_AT5G493600.513
0.7551.35779610.5100.7030.283Meristematic-XylemAT2G422301AT2G42230Meristematic-Xylem_AT1G107600.420
0.7551.21083640.5100.6880.156Meristematic-XylemAT3G161751AT3G16175Meristematic-Xylem_AT1G541200.532
0.7541.91110710.5080.6560.128Meristematic-XylemAT4G129802AT4G12980Meristematic-Xylem_AT3G034950.528
0.7541.46962470.5080.6140.153Meristematic-XylemAT1G744402AT1G74440Meristematic-Xylem_AT1G776900.461
0.7541.46624730.5080.6930.184Meristematic-XylemAT5G584801AT5G58480Meristematic-Xylem_AT1G656100.509
0.7541.35359660.5080.6780.241Meristematic-XylemAT1G724303SAUR78 Meristematic-Xylem_AT1G022050.437
0.7541.23982660.5080.7590.363Meristematic-XylemAT2G251104SDF2 Meristematic-Xylem_AT4G366200.396
0.7540.89555360.5080.5870.230Meristematic-XylemAT3G459704EXLA1 Meristematic-Xylem_AT3G066800.357
0.7540.84807970.5080.7690.354Meristematic-XylemAT1G607801AP1M2 Meristematic-Xylem_AT2G208000.415
0.7540.79625350.5080.7670.321Meristematic-XylemAT4G245501AP4M Meristematic-Xylem_AT1G607100.446
0.7531.57068560.5060.7020.150Meristematic-XylemAT4G349801SBT1.6 Meristematic-Xylem_AT1G667600.552
0.7523.23127220.5040.6690.039Meristematic-XylemAT1G233501AT1G23350Meristematic-Xylem_AT2G476700.630
0.7522.46264280.5040.5800.058Meristematic-XylemAT1G208503XCP2 Meristematic-Xylem_AT4G132500.522
0.7520.97215840.5040.7270.327Meristematic-XylemAT4G082404AT4G08240Meristematic-Xylem_AT3G134350.400
0.7520.87555620.5040.7320.313Meristematic-XylemAT2G403802PRA1B2 Meristematic-Xylem_AT5G139900.419
0.7520.81665040.5040.7270.271Meristematic-XylemAT5G395002GNL1 Meristematic-Xylem_AT5G590900.456
0.7512.03033860.5020.7120.278Meristematic-XylemAT4G089802FBW2 Meristematic-Xylem_AT5G036100.434
0.7511.53009160.5020.6660.215Meristematic-XylemAT1G075703APK1A Meristematic-Xylem_AT4G189300.451
0.7511.40873120.5020.7170.237Meristematic-XylemAT3G035901AT3G03590Meristematic-Xylem_AT5G271200.480
0.7511.02023260.5020.6540.191Meristematic-XylemAT4G234902AT4G23490Meristematic-Xylem_AT3G552800.463
0.7510.99293720.5020.8130.413Meristematic-XylemAT1G071401RANBP1A Meristematic-Xylem_AT5G403300.400
0.7510.77655580.5020.7550.354Meristematic-XylemAT4G302602AT4G30260Meristematic-Xylem_AT4G112110.401
0.7501.73180610.5000.5830.081Meristematic-XylemAT3G619202AT3G61920Meristematic-Xylem_AT5G470500.502
0.7501.39894540.5000.7000.262Meristematic-XylemAT3G506601CYP90B1 Meristematic-Xylem_AT3G212500.438
0.7500.82684660.5000.6490.145Meristematic-XylemAT4G124101AT4G12410Meristematic-Xylem_AT5G440300.504
In [47]:
cell_time_Clust_Markers <- arrange(cell_time_Clust_Markers, desc(pct.diff)) %>%
group_by(cluster) %>%
mutate(pct.diff_rank=dplyr::row_number()) %>%
arrange(desc(avg_diff)) %>%
mutate(avg_diff_rank=dplyr::row_number()) %>%
arrange(desc(myAUC)) %>%
mutate(myAUC_rank=dplyr::row_number()) %>%
mutate(combined_rank_raw=(pct.diff_rank + avg_diff_rank + myAUC_rank)/3) %>%
arrange(combined_rank_raw) %>%
mutate(combined_rank=dplyr::row_number()) %>%
select(-combined_rank_raw) %>%
arrange(combined_rank)
cell_time_Clust_Markers
A grouped_df: 16508 × 15
myAUCavg_diffpowerpct.1pct.2clustergenenNamecluster_genepct.diffpct.diff_rankavg_diff_rankmyAUC_rankcombined_rank
<dbl><dbl><dbl><dbl><dbl><fct><chr><int><chr><chr><dbl><int><int><int><int>
0.9703.7531360.9400.9730.113Meristematic-Lateral Root CapAT5G605203AT5G60520Meristematic-Lateral Root Cap_AT5G191600.860 1 1 11
0.9604.0560600.9200.9570.109Elongating-Lateral Root Cap AT2G357701SCPL28 Elongating-Lateral Root Cap_AT1G08510 0.848 1 1 11
0.9864.7626210.9720.9800.082Mature-Columella AT1G050102ACO4 Mature-Columella_AT2G28000 0.898 1 2 11
0.9624.4874580.9240.9610.130Meristematic-Atrichoblast AT5G515001PME60 Meristematic-Atrichoblast_AT4G37160 0.831 1 1 31
0.9604.4346090.9200.9580.092Mature-Procambium AT1G616602BHLH112 Mature-Procambium_AT2G39795 0.866 1 1 31
0.9764.7456810.9520.9580.061Elongating-Procambium AT4G146501AT4G14650Elongating-Procambium_AT3G62630 0.897 1 4 11
0.9694.7546660.9380.9620.081Mature-Pericycle AT5G431802AT5G43180Mature-Pericycle_AT4G33360 0.881 2 1 31
0.9713.1313380.9420.9850.128Meristematic-Procambium AT2G188003XTH21 Meristematic-Procambium_AT4G33700 0.857 1 6 11
0.9894.5140900.9780.9930.064Elongating-Endodermis AT4G221102AT4G22110Elongating-Endodermis_AT1G53163 0.929 2 6 11
0.9934.7178750.9860.9940.029Elongating-Xylem AT1G688103BHLH30 Elongating-Xylem_AT1G28250 0.965 110 11
0.9293.1216590.8580.9650.274Elongating-Columella AT5G238203ML3 Elongating-Columella_AT4G22780 0.69110 1 11
0.9243.8161260.8480.8920.100Elongating-Pericycle AT3G457003NPF2.4 Elongating-Pericycle_AT1G28360 0.792 1 1101
0.9694.5375890.9380.9710.125Mature-Cortex AT5G533702ATPMEPCRFMature-Cortex_AT4G32880 0.846 3 6 41
0.9854.3449270.9700.9880.162Elongating-Cortex AT1G290252AT1G29025Elongating-Cortex_AT5G60650 0.82610 3 11
0.9834.2274570.9660.9810.101Meristematic-Endodermis AT3G237302XTH16 Meristematic-Endodermis_AT3G56620 0.880 9 6 21
0.9723.9259340.9440.9740.153Meristematic-Cortex AT5G622104AT5G62210Meristematic-Cortex_AT5G44490 0.82110 6 21
0.9183.3274610.8360.8930.145Meristematic-Trichoblast AT1G269453PRE6 Meristematic-Trichoblast_AT5G46160 0.748 3 8 81
0.9924.5301740.9840.9970.066Mature-Endodermis AT1G615902PBL15 Mature-Endodermis_AT1G30550 0.931 118 11
0.9653.9119790.9300.9510.096Elongating-Atrichoblast AT1G653102ATXTH17 Elongating-Atrichoblast_AT4G16190 0.855 213 51
0.9624.4163210.9240.9620.147Mature-Lateral Root Cap AT2G428902ML2 Mature-Lateral Root Cap_AT5G23395 0.815 611 61
0.9603.8752740.9200.9530.086Meristematic-Phloem AT5G111005SYTD Meristematic-Phloem_AT3G56620 0.867 511 71
0.9934.5498650.9860.9960.067Mature-Trichoblast AT5G580102BHLH82 Mature-Trichoblast_AT2G22170 0.929 123 11
0.9583.8788140.9160.9630.131Mature-Atrichoblast AT3G019701WRKY45 Mature-Atrichoblast_AT2G37270 0.832 611 81
0.9684.6174490.9360.9630.086Meristematic-Xylem AT2G340601PER19 Meristematic-Xylem_AT2G16780 0.877 9 6121
0.9543.3633340.9080.9700.166Meristematic-Columella AT2G382304PDX11 Meristematic-Columella_AT3G55280 0.804 125 11
0.9614.3990700.9220.9320.053Mature-Phloem AT3G043002AT3G04300Mature-Phloem_AT1G27400 0.879 6 8141
0.9753.2468310.9500.9860.077Elongating-Phloem AT5G590903SBT4.12 Elongating-Phloem_AT4G24830 0.909 130 11
0.9302.5733400.8600.9680.233Meristematic-Pericycle AT3G625304AT3G62530Meristematic-Pericycle_AT1G15870 0.735 921 41
0.9956.8480010.9900.9910.015Mature-Xylem AT5G600201LAC17 Mature-Xylem_AT5G19750 0.976 8 8241
0.9513.9601800.9020.9520.140Meristematic-Quiescent CenterAT4G161413AT4G16141Meristematic-Quiescent Center_AT3G616300.8121013221
⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮
0.7580.88170550.5160.6760.213Meristematic-Quiescent CenterAT1G117205ATSS3 Meristematic-Quiescent Center_AT2G099900.4631526157215281607
0.7640.90343690.5280.7350.311Meristematic-Quiescent CenterAT2G476405AT2G47640Meristematic-Quiescent Center_AT5G629400.4241609156514541608
0.7531.14080030.5060.6970.255Meristematic-Quiescent CenterAT4G091401MLH1 Meristematic-Quiescent Center_AT4G327100.4421585145515941609
0.7520.96663520.5040.7100.235Meristematic-Quiescent CenterAT3G182402AT3G18240Meristematic-Quiescent Center_AT1G274000.4751490153516121610
0.7590.89210200.5180.7010.250Meristematic-Quiescent CenterAT2G442702NCS6 Meristematic-Quiescent Center_AT4G223800.4511560156715171611
0.7680.72468090.5360.7920.375Meristematic-Quiescent CenterAT5G560102HSP90-3 Meristematic-Quiescent Center_AT4G218500.4171618163013981612
0.7630.87771230.5260.7070.279Meristematic-Quiescent CenterAT5G060603AT5G06060Meristematic-Quiescent Center_AT5G123000.4281604157614661613
0.7550.92181260.5100.7210.257Meristematic-Quiescent CenterAT1G195202NFD5 Meristematic-Quiescent Center_AT2G377900.4641525155715651614
0.7540.82999990.5080.7330.258Meristematic-Quiescent CenterAT3G615301KPHMT2 Meristematic-Quiescent Center_AT2G333700.4751489159515761615
0.7501.17067800.5000.7000.266Meristematic-Quiescent CenterAT4G156403AT4G15640Meristematic-Quiescent Center_AT5G063700.4341596143216331616
0.7501.05757880.5000.7010.243Meristematic-Quiescent CenterAT2G440401DAPB1 Meristematic-Quiescent Center_AT3G464900.4581538149416341617
0.7551.04634680.5100.6610.234Meristematic-Quiescent CenterAT3G503403AT3G50340Meristematic-Quiescent Center_AT4G257400.4271605150115641618
0.7620.75854820.5240.7020.258Meristematic-Quiescent CenterAT4G294305RPS15AE Meristematic-Quiescent Center_AT1G025000.4441579161814831619
0.7561.02129370.5120.6700.256Meristematic-Quiescent CenterAT4G376603AT4G37660Meristematic-Quiescent Center_AT1G710400.4141620151015501620
0.7620.81520830.5240.7760.350Meristematic-Quiescent CenterAT4G024504P23-1 Meristematic-Quiescent Center_AT3G152400.4261607159714811621
0.7560.88981930.5120.7000.249Meristematic-Quiescent CenterAT4G266703TIM22-2 Meristematic-Quiescent Center_AT3G443000.4511562156915541622
0.7531.12398990.5060.5260.198Meristematic-Quiescent CenterAT1G078202AT1G07820Meristematic-Quiescent Center_AT1G116700.3281635146215951623
0.7530.83084450.5060.5880.117Meristematic-Quiescent CenterAT5G602501AT5G60250Meristematic-Quiescent Center_AT4G004900.4711506159415971624
0.7620.81216030.5240.7560.344Meristematic-Quiescent CenterAT5G495101PFD3 Meristematic-Quiescent Center_AT3G011900.4121626160014821625
0.7521.00979010.5040.6930.251Meristematic-Quiescent CenterAT1G190801TTN10 Meristematic-Quiescent Center_AT3G591000.4421586151516111626
0.7510.91152090.5020.7090.248Meristematic-Quiescent CenterAT5G362101AT5G36210Meristematic-Quiescent Center_AT1G489200.4611532156416251627
0.7630.70890990.5260.6960.282Meristematic-Quiescent CenterAT5G177102EMB1241 Meristematic-Quiescent Center_AT2G323800.4141622163314671628
0.7580.71914100.5160.7220.271Meristematic-Quiescent CenterAT1G737201SMU1 Meristematic-Quiescent Center_AT2G439100.4511561163115311629
0.7540.81274630.5080.7200.266Meristematic-Quiescent CenterAT3G047101TPR10 Meristematic-Quiescent Center_AT4G002000.4541551159815771630
0.7580.72745300.5160.7100.261Meristematic-Quiescent CenterAT2G423005BHLH48 Meristematic-Quiescent Center_AT4G259000.4491570162815301631
0.7560.92015390.5120.7190.326Meristematic-Quiescent CenterAT4G197004BOI Meristematic-Quiescent Center_AT5G095100.3931633155915521632
0.7540.83938150.5080.7010.260Meristematic-Quiescent CenterAT2G222307AT2G22230Meristematic-Quiescent Center_AT5G169100.4411587159015751633
0.7500.79457350.5000.6440.186Meristematic-Quiescent CenterAT3G465503FLA4 Meristematic-Quiescent Center_AT2G366200.4581537160616361634
0.7510.93140000.5020.6870.264Meristematic-Quiescent CenterAT5G552303ATMAP65-1Meristematic-Quiescent Center_AT3G622500.4231611155216241635
0.7570.69846460.5140.7210.326Meristematic-Quiescent CenterAT3G485603ALS Meristematic-Quiescent Center_AT5G407800.3951632163615441636
In [48]:
options(repr.plot.width = 16, repr.plot.height = 14)


markers_sel <- filter(cell_time_Clust_Markers, myAUC>=0.75) %>% select(gene, cluster)

markers_list <- split(markers_sel, f=markers_sel$cluster)
 
#this makes list from long df of gene lists - TARGET is what we want to keep
markers_list  <- lapply(markers_list, function(x) x[names(x)=="gene"])
# convert each sublist into character and eliminate duplicates
markers_list  <- lapply(markers_list, function(x) as.character(unique(x$gene)))
 
## GeneOverlap 

# number of integrated features

genome_size <- 17513L

#compare all lists
gom.self <- newGOM(markers_list, markers_list, genome.size=genome_size)


int <- getNestedList(gom.self, "intersection")
int_matrix <- getMatrix(gom.self, "intersection")
p.val <- getMatrix(gom.self, "pval")
JC <- getMatrix(gom.self, "Jaccard")

# log of p.val for intersection
p.val_log <- -log10(p.val + 1e-200)


olap <- Heatmap(p.val_log, 
                name = "-log10_pval", 
                col = colorRamp2(c(0, 200), 
                                 c("beige", "red")), 
                column_title = "Number of shared marker genes - AUC 0.75+", 
                cluster_rows = T,
                cluster_columns = T, 
                use_raster= FALSE, 
                show_column_names = TRUE, 
                show_row_names = TRUE, 
                show_row_dend = TRUE, 
                clustering_distance_rows = "pearson",
                clustering_distance_columns = "pearson", 
                show_column_dend = TRUE, cell_fun = function(j, i, x, y, width, height, fill) {grid.text(sprintf("%.0f", int_matrix[i, j]), x, y, gp = gpar(fontsize = 10))
}) 
                        
                        # padding - bottom, left, top, right
draw(olap, padding = unit(c(15, 5, 5, 10), "mm"), heatmap_legend_side = "left")
In [49]:
markers_sel <- filter(cell_time_Clust_Markers, myAUC>=0.75) %>% select(gene, cluster)

markers_list <- split(markers_sel, f=markers_sel$cluster)
 
#this makes list from long df of gene lists - TARGET is what we want to keep
markers_list  <- lapply(markers_list, function(x) x[names(x)=="gene"])
# convert each sublist into character and eliminate duplicates
markers_list  <- lapply(markers_list, function(x) as.character(unique(x$gene)))

cluster_GO <- gost(markers_list, organism = "athaliana", correction_method = "fdr", significant = F, multi_query = F)

cluster_GO_df <- cluster_GO[[1]]

cluster_GO_sig <- filter(cluster_GO_df, p_value<=0.01)

# top  terms for each cluster

cluster_GO_sig %>%
  filter(source=="GO:BP", intersection_size>=4) %>%
  group_by(query) %>%
  top_n(5, wt = -p_value) %>%
  arrange(desc(p_value)) -> top_GO

GO_n <- cluster_GO_sig %>%
  filter(source=="GO:BP", intersection_size>=4) %>%
  group_by(term_id) %>%
  tally() %>%
  arrange(desc(n))


GO_n <- dplyr::rename(GO_n, "n_clusters"=n)

cluster_GO_sig_n <- left_join(cluster_GO_sig, GO_n)

# get all terms for the top ones so that all clusters have values

top_GO_all <- filter(cluster_GO_df, term_id %in% top_GO$term_id)


#spread and plot


top_GO_sel <- select(top_GO_all, query, p_value, term_id, term_name)

spread_GO <- spread(top_GO_sel, key = query, p_value)

spread_GO[is.na(spread_GO)] <- 1

spread_GO_m <- as.matrix(-log10(spread_GO[3:ncol(spread_GO)]))
rownames(spread_GO_m) <- spread_GO$term_name
Joining, by = "term_id"

In [50]:
options(repr.plot.width = 18, repr.plot.height = 20)

GO_hm <- Heatmap(spread_GO_m, 
                 name = "-log10_pval", 
                 heatmap_legend_param = list(title_position="topcenter", color_bar = "continuous"), 
                 col = colorRamp2(c(0, 10), 
                                  c("beige", "#e31a1c")), 
                 cluster_rows = T,
                 cluster_columns = T, 
                 use_raster= FALSE, 
                 show_column_names = TRUE, 
                 show_row_names = TRUE, 
                 show_row_dend = TRUE, 
                 show_column_dend = TRUE, 
                 clustering_distance_rows = "pearson",
                 clustering_distance_columns = "pearson", 
                 row_names_gp = gpar(fontsize = 12)) 


# padding - bottom, left, top, right
draw(GO_hm, padding = unit(c(15, 15, 5, 80), "mm"), heatmap_legend_side = "left")
In [51]:
cell_time_Clust_Markers$clus_to_split <- cell_time_Clust_Markers$cluster
cell_time_Clust_Markers <- separate(cell_time_Clust_Markers, clus_to_split, into=c("timezone", "celltype"), sep="-")
In [52]:
cell_time_Clust_Markers$cluster <- as.character(cell_time_Clust_Markers$cluster)


cell_time_Clust_Markers$timezone <- factor(cell_time_Clust_Markers$timezone, levels=c("Mature", "Elongating", "Meristematic"))

ct_levels <- names(table(rc.integrated$celltype.anno))

cell_time_Clust_Markers$celltype <- factor(cell_time_Clust_Markers$celltype, levels=ct_levels)

cell_time_Clust_Markers <- arrange(cell_time_Clust_Markers, timezone) %>% arrange(celltype)


cell_time_Clust_Markers
A grouped_df: 16508 × 17
myAUCavg_diffpowerpct.1pct.2clustergenenNamecluster_genepct.diffpct.diff_rankavg_diff_rankmyAUC_rankcombined_ranktimezonecelltype
<dbl><dbl><dbl><dbl><dbl><chr><chr><int><chr><chr><dbl><int><int><int><int><fct><fct>
0.9604.4346090.9200.9580.092Mature-ProcambiumAT1G616602BHLH112 Mature-Procambium_AT2G397950.866 1 1 3 1MatureProcambium
0.9573.9686310.9140.9460.092Mature-ProcambiumAT3G137302CYP90D1 Mature-Procambium_AT4G242750.854 3 5 5 2MatureProcambium
0.9504.1819960.9000.9410.094Mature-ProcambiumAT1G666002WRKY63 Mature-Procambium_AT3G329300.847 4 4 8 3MatureProcambium
0.9553.8589340.9100.9510.094Mature-ProcambiumAT4G328601AT4G32860Mature-Procambium_AT3G112500.857 2 9 6 4MatureProcambium
0.9543.9457020.9080.9480.104Mature-ProcambiumAT1G337002AT1G33700Mature-Procambium_AT2G040300.844 5 6 7 5MatureProcambium
0.9393.5970710.8780.9420.135Mature-ProcambiumAT2G286603AT2G28660Mature-Procambium_AT2G012800.807101716 6MatureProcambium
0.9663.0861310.9320.9880.146Mature-ProcambiumAT1G764103ATL8 Mature-Procambium_AT1G332650.842 652 1 7MatureProcambium
0.9393.3125030.8780.9500.170Mature-ProcambiumAT5G658703PSK5 Mature-Procambium_AT4G332500.780203217 8MatureProcambium
0.9603.0107790.9200.9870.189Mature-ProcambiumAT1G631805UGE3 Mature-Procambium_AT4G185900.7981358 4 9MatureProcambium
0.9443.0023160.8880.9490.123Mature-ProcambiumAT1G227105SUC2 Mature-Procambium_AT1G499100.826 7591110MatureProcambium
0.9642.9494450.9280.9900.192Mature-ProcambiumAT1G646607MGL Mature-Procambium_AT3G265500.7981264 211MatureProcambium
0.9303.4216820.8600.9530.210Mature-ProcambiumAT4G311105WAKL18 Mature-Procambium_AT5G566800.74335242512MatureProcambium
0.9473.2659760.8940.9820.256Mature-ProcambiumAT4G025905UNE12 Mature-Procambium_AT2G184000.7264434 913MatureProcambium
0.8894.3200740.7780.8430.077Mature-ProcambiumAT1G597401NPF4.3 Mature-Procambium_AT3G543200.76626 26114MatureProcambium
0.9373.8745660.8740.9530.252Mature-ProcambiumAT2G377602AKR4C8 Mature-Procambium_AT3G070500.70163 72015MatureProcambium
0.9183.2664170.8360.9030.127Mature-ProcambiumAT3G268303CYP71B15 Mature-Procambium_AT1G108400.77621333916MatureProcambium
0.9033.7056810.8060.8760.135Mature-ProcambiumAT2G377703AKR4C9 Mature-Procambium_AT5G400800.74136125017MatureProcambium
0.9412.8603950.8820.9400.133Mature-ProcambiumAT1G148905AT1G14890Mature-Procambium_AT4G147700.807 9761418MatureProcambium
0.9123.1509490.8240.8940.100Mature-ProcambiumAT5G670902SBT1.9 Mature-Procambium_AT5G613100.79415404419MatureProcambium
0.9093.6187160.8180.9090.180Mature-ProcambiumAT5G504503AT5G50450Mature-Procambium_AT5G134700.72942164520MatureProcambium
0.9433.1391170.8860.9660.250Mature-ProcambiumAT4G342304CAD5 Mature-Procambium_AT5G621700.71652411221MatureProcambium
0.9283.5367800.8560.9520.249Mature-ProcambiumAT1G647203CP5 Mature-Procambium_AT4G364200.70361202922MatureProcambium
0.9213.2206750.8420.9320.197Mature-ProcambiumAT3G541402NPF8.1 Mature-Procambium_AT1G657000.73537373723MatureProcambium
0.9323.6647260.8640.9550.270Mature-ProcambiumAT4G372603MYB73 Mature-Procambium_AT2G414500.68576142224MatureProcambium
0.9362.9708590.8720.9650.217Mature-ProcambiumAT4G337004CBSDUF6 Mature-Procambium_AT5G571200.74832632125MatureProcambium
0.9292.8010560.8580.9140.098Mature-ProcambiumAT1G716954PER12 Mature-Procambium_AT5G613100.816 8822726MatureProcambium
0.9323.6436680.8640.9500.283Mature-ProcambiumAT4G120803AHL1 Mature-Procambium_AT1G662500.66786152327MatureProcambium
0.9302.8069640.8600.9250.144Mature-ProcambiumAT1G238004ALDH2B7 Mature-Procambium_AT2G379900.78119802628MatureProcambium
0.9223.1387550.8440.9450.221Mature-ProcambiumAT4G345904BZIP11 Mature-Procambium_AT1G674300.72447423629MatureProcambium
0.9003.1118320.8000.8990.131Mature-ProcambiumAT1G154152AT1G15415Mature-Procambium_AT1G172850.76825495530MatureProcambium
⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮⋮
0.7580.88170550.5160.6760.213Meristematic-Quiescent CenterAT1G117205ATSS3 Meristematic-Quiescent Center_AT2G099900.4631526157215281607MeristematicQuiescent Center
0.7640.90343690.5280.7350.311Meristematic-Quiescent CenterAT2G476405AT2G47640Meristematic-Quiescent Center_AT5G629400.4241609156514541608MeristematicQuiescent Center
0.7531.14080030.5060.6970.255Meristematic-Quiescent CenterAT4G091401MLH1 Meristematic-Quiescent Center_AT4G327100.4421585145515941609MeristematicQuiescent Center
0.7520.96663520.5040.7100.235Meristematic-Quiescent CenterAT3G182402AT3G18240Meristematic-Quiescent Center_AT1G274000.4751490153516121610MeristematicQuiescent Center
0.7590.89210200.5180.7010.250Meristematic-Quiescent CenterAT2G442702NCS6 Meristematic-Quiescent Center_AT4G223800.4511560156715171611MeristematicQuiescent Center
0.7680.72468090.5360.7920.375Meristematic-Quiescent CenterAT5G560102HSP90-3 Meristematic-Quiescent Center_AT4G218500.4171618163013981612MeristematicQuiescent Center
0.7630.87771230.5260.7070.279Meristematic-Quiescent CenterAT5G060603AT5G06060Meristematic-Quiescent Center_AT5G123000.4281604157614661613MeristematicQuiescent Center
0.7550.92181260.5100.7210.257Meristematic-Quiescent CenterAT1G195202NFD5 Meristematic-Quiescent Center_AT2G377900.4641525155715651614MeristematicQuiescent Center
0.7540.82999990.5080.7330.258Meristematic-Quiescent CenterAT3G615301KPHMT2 Meristematic-Quiescent Center_AT2G333700.4751489159515761615MeristematicQuiescent Center
0.7501.17067800.5000.7000.266Meristematic-Quiescent CenterAT4G156403AT4G15640Meristematic-Quiescent Center_AT5G063700.4341596143216331616MeristematicQuiescent Center
0.7501.05757880.5000.7010.243Meristematic-Quiescent CenterAT2G440401DAPB1 Meristematic-Quiescent Center_AT3G464900.4581538149416341617MeristematicQuiescent Center
0.7551.04634680.5100.6610.234Meristematic-Quiescent CenterAT3G503403AT3G50340Meristematic-Quiescent Center_AT4G257400.4271605150115641618MeristematicQuiescent Center
0.7620.75854820.5240.7020.258Meristematic-Quiescent CenterAT4G294305RPS15AE Meristematic-Quiescent Center_AT1G025000.4441579161814831619MeristematicQuiescent Center
0.7561.02129370.5120.6700.256Meristematic-Quiescent CenterAT4G376603AT4G37660Meristematic-Quiescent Center_AT1G710400.4141620151015501620MeristematicQuiescent Center
0.7620.81520830.5240.7760.350Meristematic-Quiescent CenterAT4G024504P23-1 Meristematic-Quiescent Center_AT3G152400.4261607159714811621MeristematicQuiescent Center
0.7560.88981930.5120.7000.249Meristematic-Quiescent CenterAT4G266703TIM22-2 Meristematic-Quiescent Center_AT3G443000.4511562156915541622MeristematicQuiescent Center
0.7531.12398990.5060.5260.198Meristematic-Quiescent CenterAT1G078202AT1G07820Meristematic-Quiescent Center_AT1G116700.3281635146215951623MeristematicQuiescent Center
0.7530.83084450.5060.5880.117Meristematic-Quiescent CenterAT5G602501AT5G60250Meristematic-Quiescent Center_AT4G004900.4711506159415971624MeristematicQuiescent Center
0.7620.81216030.5240.7560.344Meristematic-Quiescent CenterAT5G495101PFD3 Meristematic-Quiescent Center_AT3G011900.4121626160014821625MeristematicQuiescent Center
0.7521.00979010.5040.6930.251Meristematic-Quiescent CenterAT1G190801TTN10 Meristematic-Quiescent Center_AT3G591000.4421586151516111626MeristematicQuiescent Center
0.7510.91152090.5020.7090.248Meristematic-Quiescent CenterAT5G362101AT5G36210Meristematic-Quiescent Center_AT1G489200.4611532156416251627MeristematicQuiescent Center
0.7630.70890990.5260.6960.282Meristematic-Quiescent CenterAT5G177102EMB1241 Meristematic-Quiescent Center_AT2G323800.4141622163314671628MeristematicQuiescent Center
0.7580.71914100.5160.7220.271Meristematic-Quiescent CenterAT1G737201SMU1 Meristematic-Quiescent Center_AT2G439100.4511561163115311629MeristematicQuiescent Center
0.7540.81274630.5080.7200.266Meristematic-Quiescent CenterAT3G047101TPR10 Meristematic-Quiescent Center_AT4G002000.4541551159815771630MeristematicQuiescent Center
0.7580.72745300.5160.7100.261Meristematic-Quiescent CenterAT2G423005BHLH48 Meristematic-Quiescent Center_AT4G259000.4491570162815301631MeristematicQuiescent Center
0.7560.92015390.5120.7190.326Meristematic-Quiescent CenterAT4G197004BOI Meristematic-Quiescent Center_AT5G095100.3931633155915521632MeristematicQuiescent Center
0.7540.83938150.5080.7010.260Meristematic-Quiescent CenterAT2G222307AT2G22230Meristematic-Quiescent Center_AT5G169100.4411587159015751633MeristematicQuiescent Center
0.7500.79457350.5000.6440.186Meristematic-Quiescent CenterAT3G465503FLA4 Meristematic-Quiescent Center_AT2G366200.4581537160616361634MeristematicQuiescent Center
0.7510.93140000.5020.6870.264Meristematic-Quiescent CenterAT5G552303ATMAP65-1Meristematic-Quiescent Center_AT3G622500.4231611155216241635MeristematicQuiescent Center
0.7570.69846460.5140.7210.326Meristematic-Quiescent CenterAT3G485603ALS Meristematic-Quiescent Center_AT5G407800.3951632163615441636MeristematicQuiescent Center
In [53]:
write.csv(cell_time_Clust_Markers, "./supp_data/Atlas_cell_time_combined_ROC_Clust_Markers_20200527.csv", row.names=F)

Selected Markers for Cell type and developmental stage specific dot plot

SCR, MYB36 and CASP1 were selected for the endodermis because they are highlighted later in the manuscript and are highly enrichened. Note that MYB36 is expressed in all developmental stages of endodermis, but is highest in the elongation zone.

For others, I took the top 20 combined rank and gave preference for those that were specific (i.e. n<=1) or where known markers

In [54]:
(Markers_to_plot <- read_csv("./supp_data/Atlas_cell_time_combined_ROC_Clust_Markers_20200527_to_plot.csv") %>% filter(plot=="y"))
Parsed with column specification:
cols(
  myAUC = col_double(),
  avg_diff = col_double(),
  power = col_double(),
  pct.1 = col_double(),
  pct.2 = col_double(),
  cluster = col_character(),
  gene = col_character(),
  n = col_double(),
  Name = col_character(),
  cluster_gene = col_character(),
  pct.diff = col_double(),
  pct.diff_rank = col_double(),
  avg_diff_rank = col_double(),
  myAUC_rank = col_double(),
  combined_rank = col_double(),
  timezone = col_character(),
  celltype = col_character(),
  plot = col_character()
)

A spec_tbl_df: 32 × 18
myAUCavg_diffpowerpct.1pct.2clustergenenNamecluster_genepct.diffpct.diff_rankavg_diff_rankmyAUC_rankcombined_ranktimezonecelltypeplot
<dbl><dbl><dbl><dbl><dbl><chr><chr><dbl><chr><chr><dbl><dbl><dbl><dbl><dbl><chr><chr><chr>
0.9604.4346090.9200.9580.092Mature-Procambium AT1G616602BHLH112 Mature-Procambium_AT2G39795 0.866 1 1 3 1Mature Procambium y
0.9764.7456810.9520.9580.061Elongating-Procambium AT4G146501AT4G14650Elongating-Procambium_AT3G62630 0.897 1 4 1 1Elongating Procambium y
0.9142.5185560.8280.9070.146Meristematic-Procambium AT5G192601FAF3 Meristematic-Procambium_AT1G09590 0.761 8 15 20 4MeristematicProcambium y
0.9956.8480010.9900.9910.015Mature-Xylem AT5G600201LAC17 Mature-Xylem_AT5G19750 0.976 8 8 24 1Mature Xylem y
0.9934.7178750.9860.9940.029Elongating-Xylem AT1G688103BHLH30 Elongating-Xylem_AT1G28250 0.965 1 10 1 1Elongating Xylem y
0.9684.6174490.9360.9630.086Meristematic-Xylem AT2G340601PER19 Meristematic-Xylem_AT2G16780 0.877 9 6 12 1MeristematicXylem y
0.9614.3990700.9220.9320.053Mature-Phloem AT3G043002AT3G04300Mature-Phloem_AT1G27400 0.879 6 8 14 1Mature Phloem y
0.9753.2468310.9500.9860.077Elongating-Phloem AT5G590903SBT4.12 Elongating-Phloem_AT4G24830 0.909 1 30 1 1Elongating Phloem y
0.9733.4269090.9460.9610.045Meristematic-Phloem AT1G794303APL Meristematic-Phloem_AT3G25290 0.916 1 40 1 4MeristematicPhloem y
0.9513.4559650.9020.9430.076Mature-Pericycle AT1G163101MTP10 Mature-Pericycle_AT2G28790 0.867 3 9 7 4Mature Pericycle y
0.9463.4778060.8920.9790.268Elongating-Pericycle AT2G441601MTHFR2 Elongating-Pericycle_AT3G02677 0.711 17 3 1 3Elongating Pericycle y
0.8012.5515370.6020.7770.165Meristematic-Pericycle AT2G148801AT2G14880Meristematic-Pericycle_AT2G33847 0.612205 25369163MeristematicPericycle y
0.8754.1779320.7500.8490.089Mature-Endodermis AT2G361001CASP1 Mature-Endodermis_AT3G14000 0.760 10 24 21 6Mature Endodermis y
0.9873.6737660.9740.9970.064Elongating-Endodermis AT5G576203MYB36 Elongating-Endodermis_AT3G14560 0.933 1 32 2 2Elongating Endodermis y
0.9404.3757700.8800.9340.110Meristematic-Endodermis AT3G542201SCR Meristematic-Endodermis_AT2G43800 0.824 19 4 36 7MeristematicEndodermis y
0.9084.1890320.8160.8810.119Mature-Cortex AT4G097601AT4G09760Mature-Cortex_AT1G30440 0.762 18 12 28 10Mature Cortex y
0.9314.6693600.8620.9120.106Elongating-Cortex AT5G646202C/VIF2 Elongating-Cortex_AT4G25740 0.806 16 2 24 7Elongating Cortex y
0.9473.8361290.8940.9500.146Meristematic-Cortex AT5G020002AT5G02000Meristematic-Cortex_AT5G22330 0.804 13 9 22 4MeristematicCortex y
0.9854.8744570.9700.9790.066Mature-Trichoblast AT4G258201XTH14 Mature-Trichoblast_AT1G18250 0.913 7 14 6 2Mature Trichoblast y
0.9234.4319980.8460.9020.079Elongating-Trichoblast AT2G349401VSR5 Elongating-Trichoblast_AT3G04230 0.823 11 11 38 4Elongating Trichoblast y
0.8953.2807220.7900.8600.102Meristematic-Trichoblast AT1G271402GSTU14 Meristematic-Trichoblast_AT3G23820 0.758 2 10 52 6MeristematicTrichoblast y
0.9583.8788140.9160.9630.131Mature-Atrichoblast AT3G019701WRKY45 Mature-Atrichoblast_AT2G37270 0.832 6 11 8 1Mature Atrichoblast y
0.9814.6143980.9620.9930.292Elongating-Atrichoblast AT5G609501COBL5 Elongating-Atrichoblast_AT5G03150 0.701 33 1 1 4Elongating Atrichoblast y
0.9624.4874580.9240.9610.130Meristematic-Atrichoblast AT5G515001PME60 Meristematic-Atrichoblast_AT4G37160 0.831 1 1 3 1MeristematicAtrichoblast y
0.9214.9638590.8420.8600.046Mature-Lateral Root Cap AT3G259501AT3G25950Mature-Lateral Root Cap_AT5G06060 0.814 7 5 27 3Mature Lateral Root Capy
0.9604.0560600.9200.9570.109Elongating-Lateral Root Cap AT2G357701SCPL28 Elongating-Lateral Root Cap_AT1G08510 0.848 1 1 1 1Elongating Lateral Root Capy
0.9573.2181720.9140.9560.119Meristematic-Lateral Root CapAT4G371602sks15 Meristematic-Lateral Root Cap_AT3G031500.837 5 8 5 2MeristematicLateral Root Capy
0.9083.6733100.8160.8780.158Mature-Columella AT4G207801CML42 Mature-Columella_AT1G25277 0.720 18 12 21 8Mature Columella y
0.9293.1216590.8580.9650.274Elongating-Columella AT5G238203ML3 Elongating-Columella_AT4G22780 0.691 10 1 1 1Elongating Columella y
0.8773.5440890.7540.7810.057Meristematic-Columella AT3G036201DTX24 Meristematic-Columella_AT2G28810 0.724 14 15 34 10MeristematicColumella y
0.9593.1526800.9180.9630.138Meristematic-Stem Cell Niche AT4G256304MED36A Meristematic-Stem Cell Niche_AT5G59845 0.825 1126 2 6MeristematicStem Cell Niche y
0.9324.3385150.8640.9070.074Meristematic-Quiescent CenterAT5G483601FH9 Meristematic-Quiescent Center_AT5G130600.833 3 4104 9MeristematicQuiescent Centery
In [55]:
(c_levels <- unique(Markers_to_plot$cluster))
  1. 'Mature-Procambium'
  2. 'Elongating-Procambium'
  3. 'Meristematic-Procambium'
  4. 'Mature-Xylem'
  5. 'Elongating-Xylem'
  6. 'Meristematic-Xylem'
  7. 'Mature-Phloem'
  8. 'Elongating-Phloem'
  9. 'Meristematic-Phloem'
  10. 'Mature-Pericycle'
  11. 'Elongating-Pericycle'
  12. 'Meristematic-Pericycle'
  13. 'Mature-Endodermis'
  14. 'Elongating-Endodermis'
  15. 'Meristematic-Endodermis'
  16. 'Mature-Cortex'
  17. 'Elongating-Cortex'
  18. 'Meristematic-Cortex'
  19. 'Mature-Trichoblast'
  20. 'Elongating-Trichoblast'
  21. 'Meristematic-Trichoblast'
  22. 'Mature-Atrichoblast'
  23. 'Elongating-Atrichoblast'
  24. 'Meristematic-Atrichoblast'
  25. 'Mature-Lateral Root Cap'
  26. 'Elongating-Lateral Root Cap'
  27. 'Meristematic-Lateral Root Cap'
  28. 'Mature-Columella'
  29. 'Elongating-Columella'
  30. 'Meristematic-Columella'
  31. 'Meristematic-Stem Cell Niche'
  32. 'Meristematic-Quiescent Center'
In [56]:
ct_to_plt_Names <- Markers_to_plot$Name
ct_to_plt_genes <- Markers_to_plot$gene
In [57]:
table(rc.integrated$cell_time_final)
      Elongating-Atrichoblast          Elongating-Columella 
                         5223                          2405 
            Elongating-Cortex         Elongating-Endodermis 
                         5698                          4801 
  Elongating-Lateral Root Cap          Elongating-Pericycle 
                         4273                          6265 
            Elongating-Phloem         Elongating-Procambium 
                         4078                          6275 
       Elongating-Trichoblast              Elongating-Xylem 
                         4598                          2752 
          Mature-Atrichoblast              Mature-Columella 
                         3661                          6834 
                Mature-Cortex             Mature-Endodermis 
                         2822                          4273 
      Mature-Lateral Root Cap              Mature-Pericycle 
                         2780                          3670 
                Mature-Phloem             Mature-Procambium 
                         1117                          2662 
           Mature-Trichoblast                  Mature-Xylem 
                         3881                          1618 
    Meristematic-Atrichoblast        Meristematic-Columella 
                         4096                          3600 
          Meristematic-Cortex       Meristematic-Endodermis 
                         1686                          1405 
Meristematic-Lateral Root Cap        Meristematic-Pericycle 
                         6895                          1643 
          Meristematic-Phloem       Meristematic-Procambium 
                         1546                          2945 
Meristematic-Quiescent Center  Meristematic-Stem Cell Niche 
                         1195                          1807 
     Meristematic-Trichoblast            Meristematic-Xylem 
                         3330                           593 
In [58]:
rc.integrated$cell_time_final <- factor(rc.integrated$cell_time_final, levels=rev(c_levels))
Idents(rc.integrated) <- "cell_time_final"
table(rc.integrated$cell_time_final)
Meristematic-Quiescent Center  Meristematic-Stem Cell Niche 
                         1195                          1807 
       Meristematic-Columella          Elongating-Columella 
                         3600                          2405 
             Mature-Columella Meristematic-Lateral Root Cap 
                         6834                          6895 
  Elongating-Lateral Root Cap       Mature-Lateral Root Cap 
                         4273                          2780 
    Meristematic-Atrichoblast       Elongating-Atrichoblast 
                         4096                          5223 
          Mature-Atrichoblast      Meristematic-Trichoblast 
                         3661                          3330 
       Elongating-Trichoblast            Mature-Trichoblast 
                         4598                          3881 
          Meristematic-Cortex             Elongating-Cortex 
                         1686                          5698 
                Mature-Cortex       Meristematic-Endodermis 
                         2822                          1405 
        Elongating-Endodermis             Mature-Endodermis 
                         4801                          4273 
       Meristematic-Pericycle          Elongating-Pericycle 
                         1643                          6265 
             Mature-Pericycle           Meristematic-Phloem 
                         3670                          1546 
            Elongating-Phloem                 Mature-Phloem 
                         4078                          1117 
           Meristematic-Xylem              Elongating-Xylem 
                          593                          2752 
                 Mature-Xylem       Meristematic-Procambium 
                         1618                          2945 
        Elongating-Procambium             Mature-Procambium 
                         6275                          2662 
In [59]:
(breaks <- rev(ct_to_plt_genes))
  1. 'AT5G48360'
  2. 'AT4G25630'
  3. 'AT3G03620'
  4. 'AT5G23820'
  5. 'AT4G20780'
  6. 'AT4G37160'
  7. 'AT2G35770'
  8. 'AT3G25950'
  9. 'AT5G51500'
  10. 'AT5G60950'
  11. 'AT3G01970'
  12. 'AT1G27140'
  13. 'AT2G34940'
  14. 'AT4G25820'
  15. 'AT5G02000'
  16. 'AT5G64620'
  17. 'AT4G09760'
  18. 'AT3G54220'
  19. 'AT5G57620'
  20. 'AT2G36100'
  21. 'AT2G14880'
  22. 'AT2G44160'
  23. 'AT1G16310'
  24. 'AT1G79430'
  25. 'AT5G59090'
  26. 'AT3G04300'
  27. 'AT2G34060'
  28. 'AT1G68810'
  29. 'AT5G60020'
  30. 'AT5G19260'
  31. 'AT4G14650'
  32. 'AT1G61660'
In [60]:
(labels <- rev(ct_to_plt_Names))
  1. 'FH9'
  2. 'MED36A'
  3. 'DTX24'
  4. 'ML3'
  5. 'CML42'
  6. 'sks15'
  7. 'SCPL28'
  8. 'AT3G25950'
  9. 'PME60'
  10. 'COBL5'
  11. 'WRKY45'
  12. 'GSTU14'
  13. 'VSR5'
  14. 'XTH14'
  15. 'AT5G02000'
  16. 'C/VIF2'
  17. 'AT4G09760'
  18. 'SCR'
  19. 'MYB36'
  20. 'CASP1'
  21. 'AT2G14880'
  22. 'MTHFR2'
  23. 'MTP10'
  24. 'APL'
  25. 'SBT4.12'
  26. 'AT3G04300'
  27. 'PER19'
  28. 'BHLH30'
  29. 'LAC17'
  30. 'FAF3'
  31. 'AT4G14650'
  32. 'BHLH112'
In [61]:
options(repr.plot.width=14, repr.plot.height=10)

DotPlot(object = rc.integrated, features = ct_to_plt_genes, cols = c("white", "red")) + RotatedAxis() + 
scale_x_discrete(breaks=breaks, labels=labels) + xlab("")
In [62]:
options(repr.plot.width=14, repr.plot.height=10)
dot <- DotPlot(object = rc.integrated, features = ct_to_plt_genes, cols = c("white", "red")) + RotatedAxis() + ylab("")  + theme(axis.title.y=element_blank(),
        axis.text.y=element_blank(),
        axis.ticks.y=element_blank()) + 
scale_x_discrete(breaks=breaks, labels=labels) + xlab("")
dot
In [63]:
options(repr.plot.width=14, repr.plot.height=10)
dot <- dot + geom_rect(xmin = 0.5, xmax = 1.5, ymin = 0.5, ymax = 1.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 1.5, xmax = 2.5, ymin = 1.5, ymax = 2.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 2.5, xmax = 5.5, ymin = 2.5, ymax = 5.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 5.5, xmax = 8.5, ymin = 5.5, ymax = 8.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 8.5, xmax = 11.5, ymin = 8.5, ymax = 11.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 11.5, xmax = 14.5, ymin = 11.5, ymax = 14.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 14.5, xmax = 17.5, ymin = 14.5, ymax = 17.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 17.5, xmax = 20.5, ymin = 17.5, ymax = 20.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 20.5, xmax = 23.5, ymin = 20.5, ymax = 23.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 23.5, xmax = 26.5, ymin = 23.5, ymax = 26.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 26.5, xmax = 29.5, ymin = 26.5, ymax = 29.5, alpha = 0,fill=alpha("grey",0), color="black") + 
geom_rect(xmin = 29.5, xmax = 32.5, ymin = 29.5, ymax = 32.5, alpha = 0,fill=alpha("grey",0), color="black") 

dot
In [64]:
ann_df <- tibble(timezone=as.character(Markers_to_plot$timezone), 
                celltype= as.character(Markers_to_plot$celltype)) %>% 
mutate(row=dplyr::row_number(), 
col=rep("A")) %>%
group_by(celltype) %>%
mutate(ct_row=dplyr::row_number()) %>%
ungroup() %>%
mutate(Label=celltype)

ann_df$Label[ann_df$ct_row!=2] <- " "
ann_df$Label[ann_df$celltype=="Stem Cell Niche"] <- "Stem Cell Niche"
ann_df$Label[ann_df$celltype=="Quiescent Center"] <- "Quiescent Center"

ann_df$row <- factor(ann_df$row)
ann_df$timezone <- factor(ann_df$timezone, levels=c("Meristematic", "Elongating", "Mature"))
In [65]:
ann_df
A tibble: 32 × 6
timezonecelltyperowcolct_rowLabel
<fct><chr><fct><chr><int><chr>
Mature Procambium 1 A1
Elongating Procambium 2 A2Procambium
MeristematicProcambium 3 A3
Mature Xylem 4 A1
Elongating Xylem 5 A2Xylem
MeristematicXylem 6 A3
Mature Phloem 7 A1
Elongating Phloem 8 A2Phloem
MeristematicPhloem 9 A3
Mature Pericycle 10A1
Elongating Pericycle 11A2Pericycle
MeristematicPericycle 12A3
Mature Endodermis 13A1
Elongating Endodermis 14A2Endodermis
MeristematicEndodermis 15A3
Mature Cortex 16A1
Elongating Cortex 17A2Cortex
MeristematicCortex 18A3
Mature Trichoblast 19A1
Elongating Trichoblast 20A2Trichoblast
MeristematicTrichoblast 21A3
Mature Atrichoblast 22A1
Elongating Atrichoblast 23A2Atrichoblast
MeristematicAtrichoblast 24A3
Mature Lateral Root Cap25A1
Elongating Lateral Root Cap26A2Lateral Root Cap
MeristematicLateral Root Cap27A3
Mature Columella 28A1
Elongating Columella 29A2Columella
MeristematicColumella 30A3
MeristematicStem Cell Niche 31A1Stem Cell Niche
MeristematicQuiescent Center32A1Quiescent Center
In [66]:
options(repr.plot.width=1, repr.plot.height=10)
(time_ann_p <- ann_df %>% ggplot(aes(x=col, y=rev(row), fill=timezone)) + geom_tile() + scale_fill_manual(values = c("#DCEDC8", "#42B3D5", "#1A237E")) + theme_nothing())
In [67]:
options(repr.plot.width=2, repr.plot.height=10)
ann_df %>% ggplot(aes(x=col, y=rev(row), fill=timezone)) + geom_tile() + scale_fill_manual(values = c("#DCEDC8", "#42B3D5", "#1A237E")) + theme_minimal()
In [68]:
options(repr.plot.width=1, repr.plot.height=10)

ann_df$celltype <- factor(ann_df$celltype, levels = order[sort(match(unique(ann_df$celltype),order))])

color <- palette[sort(match(unique(ann_df$celltype),order))]

(cell_ann_p <- ann_df %>% ggplot(aes(x=col, y=rev(row), fill=celltype)) + geom_tile() + scale_fill_manual(values = color) + theme_nothing())
In [69]:
options(repr.plot.width=1, repr.plot.height=10)
cell_ann_p | time_ann_p
In [70]:
options(repr.plot.width=2.2, repr.plot.height=10)
(text_ann_p <- ann_df %>% ggplot(aes(x=col, y=rev(row), label=Label)) + geom_text(size = 5) + theme(plot.margin = margin(0, 0, 35, 35, "cm")) + theme_nothing())
In [71]:
options(repr.plot.width=4.5, repr.plot.height=10)
(c_ann <- text_ann_p | (cell_ann_p | time_ann_p))
In [72]:
options(repr.plot.width=14, repr.plot.height=10)
combined_marker_plot <- text_ann_p + cell_ann_p + time_ann_p + dot + patchwork::plot_layout(widths = c(0.8,0.2,0.2,4), nrow=1)
combined_marker_plot
In [73]:
options(repr.plot.width=9, repr.plot.height=6)

order <- c("Quiescent Center", "Stem Cell Niche", "Columella", "Lateral Root Cap", "Atrichoblast", "Trichoblast", "Cortex", "Endodermis", "Pericycle", "Phloem", "Xylem", "Procambium", "Unknown")
order <- rev(order)
palette <- c("#BD53FF", "#DED3FE", "#5AB953", "#BFEF45", "#008080", "#21B6A8", "#82B6FF", "#0000FF","#FF9900","#E6194B", "#9A6324", "#FFE119","#EEEEEE")
palette <- rev(palette)
rc.integrated$celltype.anno <- factor(rc.integrated$celltype.anno, levels = order[sort(match(unique(rc.integrated$celltype.anno),order))])
color <- palette[sort(match(unique(rc.integrated$celltype.anno),order))]

cell_dim <- DimPlot(rc.integrated, reduction = "umap", group.by = "celltype.anno", cols=color)

cell_dim[[1]]$layers[[1]]$aes_params$alpha = 1 # can change w/ this if you like. I decided not to so side anno would match 

cell_dim
In [74]:
options(repr.plot.width=9, repr.plot.height=6)
time_plt <- DimPlot(rc.integrated, 
        group.by = "time.anno", 
        order = c("Meristem","Elongation","Maturation"),
        cols = c("#1A237E", "#42B3D5", "#DCEDC8"))
time_plt
In [75]:
options(repr.plot.width=16, repr.plot.height=18)
(cell_dim + time_plt) / combined_marker_plot + patchwork::plot_layout(nrow=2, heights = c(1, 1.4), guides = 'collect')
In [76]:
ggsave("./supp_data/Atlas_cell_dev_marker_dot.pdf", width=16, height=18)
In [77]:
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS/LAPACK: /home/tmnolan7/anaconda3/envs/r_3.6.1/lib/libopenblasp-r0.3.7.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
 [1] ggrepel_0.8.2        gprofiler2_0.1.8     GeneOverlap_1.22.0  
 [4] circlize_0.4.8       ComplexHeatmap_2.2.0 cowplot_1.0.0       
 [7] future_1.17.0        RColorBrewer_1.1-2   Seurat_3.1.5        
[10] forcats_0.5.0        stringr_1.4.0        dplyr_0.8.5         
[13] purrr_0.3.3          readr_1.3.1          tidyr_1.0.2         
[16] tibble_3.0.1         ggplot2_3.3.0        tidyverse_1.3.0     

loaded via a namespace (and not attached):
  [1] Rtsne_0.15           colorspace_1.4-1     rjson_0.2.20        
  [4] ellipsis_0.3.0       ggridges_0.5.2       IRdisplay_0.7.0     
  [7] GlobalOptions_0.1.1  base64enc_0.1-3      fs_1.4.1            
 [10] clue_0.3-57          rstudioapi_0.11      farver_2.0.3        
 [13] leiden_0.3.3         listenv_0.8.0        npsurv_0.4-0        
 [16] fansi_0.4.1          lubridate_1.7.8      xml2_1.3.0          
 [19] codetools_0.2-16     splines_3.6.1        lsei_1.2-0          
 [22] IRkernel_1.1         jsonlite_1.6.1       broom_0.5.5         
 [25] ica_1.0-2            cluster_2.1.0        dbplyr_1.4.2        
 [28] png_0.1-7            uwot_0.1.8           sctransform_0.2.1   
 [31] compiler_3.6.1       httr_1.4.1           backports_1.1.7     
 [34] assertthat_0.2.1     Matrix_1.2-18        lazyeval_0.2.2      
 [37] cli_2.0.2            htmltools_0.4.0      tools_3.6.1         
 [40] rsvd_1.0.3           igraph_1.2.5         gtable_0.3.0        
 [43] glue_1.4.1           RANN_2.6.1           reshape2_1.4.3      
 [46] rappdirs_0.3.1       Rcpp_1.0.4.6         cellranger_1.1.0    
 [49] vctrs_0.2.4          gdata_2.18.0         ape_5.3             
 [52] nlme_3.1-145         lmtest_0.9-37        globals_0.12.5      
 [55] rvest_0.3.5          lifecycle_0.2.0      irlba_2.3.3         
 [58] gtools_3.8.2         MASS_7.3-51.5        zoo_1.8-8           
 [61] scales_1.1.1         hms_0.5.3            parallel_3.6.1      
 [64] gridExtra_2.3        reticulate_1.15      pbapply_1.4-2       
 [67] stringi_1.4.3        caTools_1.18.0       shape_1.4.4         
 [70] repr_1.1.0           rlang_0.4.6          pkgconfig_2.0.3     
 [73] bitops_1.0-6         evaluate_0.14        lattice_0.20-41     
 [76] ROCR_1.0-7           labeling_0.3         patchwork_1.0.0.9000
 [79] htmlwidgets_1.5.1    tidyselect_1.0.0     RcppAnnoy_0.0.16    
 [82] plyr_1.8.6           magrittr_1.5         R6_2.4.1            
 [85] gplots_3.0.3         generics_0.0.2       pbdZMQ_0.3-3        
 [88] DBI_1.1.0            pillar_1.4.3         haven_2.2.0         
 [91] withr_2.2.0          fitdistrplus_1.0-14  RCurl_1.98-1.2      
 [94] survival_3.1-11      tsne_0.1-3           future.apply_1.4.0  
 [97] modelr_0.1.6         crayon_1.3.4         uuid_0.1-4          
[100] KernSmooth_2.23-16   plotly_4.9.2.1       GetoptLong_0.1.8    
[103] readxl_1.3.1         data.table_1.12.8    reprex_0.3.0        
[106] digest_0.6.25        munsell_0.5.0        viridisLite_0.3.0